1
0
mirror of https://github.com/catseye/SixtyPical.git synced 2024-06-11 18:29:33 +00:00

Ophis AND VICE like the look of things now.

This commit is contained in:
Cat's Eye Technologies 2014-04-01 15:09:28 +01:00
parent 0f71bcd7d2
commit 8c9dfe7004
4 changed files with 29 additions and 2 deletions

View File

@ -198,7 +198,11 @@ No duplicate declarations.
| ldy score
| tya
| }
= .org $c000
= .org 0
= .word $0801
= .org $0801
= .byte $10, $08, $c9, $07, $9e, $32, $30, $36, $31, $00, $00, $00
= jmp main
= score: .word 0
= .alias screen 4000
= main:

12
eg/sample.60pical Normal file
View File

@ -0,0 +1,12 @@
reserve word score
assign word screen 4000
routine main {
lda screen
tax
tay
cmp score
ldx score
txa
ldy score
tya
}

4
loadngo.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
bin/sixtypical emit $1 > tmp.oph && ophis tmp.oph -o tmp.prg && x64 tmp.prg
rm -f tmp.oph tmp.prg

View File

@ -4,8 +4,15 @@ module SixtyPical.Emitter where
import SixtyPical.Model
basicHeader =
".org 0\n" ++
".word $0801\n" ++
".org $0801\n" ++
".byte $10, $08, $c9, $07, $9e, $32, $30, $36, $31, $00, $00, $00\n" ++
" jmp main\n"
emitProgram p@(Program decls routines) =
".org $c000\n" ++
basicHeader ++
emitDecls p decls ++
emitRoutines p routines