View unanswered posts | View active topics It is currently Thu Mar 28, 2024 12:16 pm



Reply to topic  [ 52 posts ]  Go to page Previous  1, 2, 3, 4
 PLASMA virtual machine on the OPC6 
Author Message

Joined: Tue Feb 10, 2015 7:07 am
Posts: 52
SteveF wrote:
Dave - I see you're busy with the C64 port and probably other stuff as well, would you be willing to have a go at creating such a version of b-em, please? If not I can have a go at it myself. I'm also quite happy to break off development of the OPC6 port temporarily if you're interested in doing this but not right now.

I might not be able to look at this seriously until next week (as I'm meant to be painting this week).

Dave


Tue Aug 15, 2017 9:26 pm
Profile

Joined: Sat Aug 05, 2017 6:57 pm
Posts: 26
Thanks Dave, if you could take a look next week that would be great - as I say I'm quite happy to put this port on hold temporarily, I have visitors coming this weekend anyway and it would give me a chance to do some tidying up on the Acorn port of PLASMA/the VideoNuLA version of STEM too.


Tue Aug 15, 2017 9:34 pm
Profile

Joined: Wed Jan 09, 2013 6:54 pm
Posts: 1780
It's a milestone Steve - well done! Even standalone with I/O would be a good HLL demonstrator.


Tue Aug 15, 2017 9:36 pm
Profile

Joined: Sat Aug 05, 2017 6:57 pm
Posts: 26
Well we can certainly do that much. :-)

Code:
steven@riemann:~/src/PLASMA-opc6$ cat hello.pla
word i

asm putc
    pop r10, restk
    push r10, restk
    out r10, r0, charout
    mov pc, rlink
end

asm putln
    EQU charout, 0xfe09   
    mov r10, r0, 10
    out r10, r0, charout
    mov r10, r0, 13
    out r10, r0, charout
    ;* We must return a value; we just return zero.
    push r0, restk
    mov pc, rlink
end

def puts(str)
    byte len, c
    len = ^str
    while len > 0
        str++
        putc(^str)
        len--
    loop
end

def puti(i)
  if i < 0; putc('-'); i = -i; fin
  if i < 10
    putc(i + '0')
  else
    puti(i / 10)
    putc(i % 10 + '0')
  fin
end

def hello(i)
    word j
    puts("Hello AnyCPU! ")   
    for j = i to i + 5
        puti(j)
        putc(' ')
    next
    putln()
end

for i = 1 to 10
    hello(i)
next
done
steven@riemann:~/src/PLASMA-opc6$ ./doit.sh hello.pla
[...]
steven@riemann:~/src/PLASMA-opc6$ python output.py emuout.txt
Hello AnyCPU! 1 2 3 4 5 6
Hello AnyCPU! 2 3 4 5 6 7
Hello AnyCPU! 3 4 5 6 7 8
Hello AnyCPU! 4 5 6 7 8 9
Hello AnyCPU! 5 6 7 8 9 10
Hello AnyCPU! 6 7 8 9 10 11
Hello AnyCPU! 7 8 9 10 11 12
Hello AnyCPU! 8 9 10 11 12 13
Hello AnyCPU! 9 10 11 12 13 14
Hello AnyCPU! 10 11 12 13 14 15

I must admit I'm quite chuffed to have got this far. :-) Thanks to you all for your help...


Tue Aug 15, 2017 9:46 pm
Profile

Joined: Tue Apr 25, 2017 7:33 pm
Posts: 32
Steve, this is great. Well done. I'm looking forward to having a go at some Plasma programming.

Rich


Tue Aug 15, 2017 10:00 pm
Profile

Joined: Wed Jan 09, 2013 6:54 pm
Posts: 1780
Excellent!


Wed Aug 16, 2017 8:00 am
Profile

Joined: Wed Apr 24, 2013 9:40 pm
Posts: 213
Location: Huntsville, AL
Very cool indeed!

_________________
Michael A.


Fri Aug 18, 2017 12:36 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 52 posts ]  Go to page Previous  1, 2, 3, 4

Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software