mirror of
https://github.com/catseye/SixtyPical.git
synced 2025-02-27 13:29:03 +00:00
Ophis AND VICE like the look of things now.
This commit is contained in:
parent
0f71bcd7d2
commit
8c9dfe7004
@ -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
12
eg/sample.60pical
Normal 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
4
loadngo.sh
Executable 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
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user