2020-09-20 21:49:36 +00:00
|
|
|
%import textio
|
2020-12-07 22:29:34 +00:00
|
|
|
%import diskio
|
2020-11-15 16:44:47 +00:00
|
|
|
%import floats
|
2020-12-10 22:30:58 +00:00
|
|
|
%import graphics
|
2020-11-15 14:04:23 +00:00
|
|
|
%zeropage basicsafe
|
2020-11-20 21:15:14 +00:00
|
|
|
%import test_stack
|
2020-12-08 00:02:38 +00:00
|
|
|
%option no_sysinit
|
|
|
|
|
2020-12-08 21:54:20 +00:00
|
|
|
main {
|
2020-12-11 20:05:03 +00:00
|
|
|
|
2020-12-21 20:04:29 +00:00
|
|
|
asmsub GRAPH_draw_line(uword x1 @R0, uword y1 @R1, uword x2 @R2, uword y2 @R3) clobbers(A,X,Y) {
|
|
|
|
%asm {{
|
|
|
|
lda cx16.r0
|
|
|
|
ldy cx16.r0+1
|
|
|
|
jsr txt.print_uw
|
|
|
|
lda #13
|
|
|
|
jsr c64.CHROUT
|
|
|
|
lda cx16.r1
|
|
|
|
ldy cx16.r1+1
|
|
|
|
jsr txt.print_uw
|
|
|
|
lda #13
|
|
|
|
jsr c64.CHROUT
|
|
|
|
lda cx16.r2
|
|
|
|
ldy cx16.r2+1
|
|
|
|
jsr txt.print_uw
|
|
|
|
lda #13
|
|
|
|
jsr c64.CHROUT
|
|
|
|
lda cx16.r3
|
|
|
|
ldy cx16.r3+1
|
|
|
|
jsr txt.print_uw
|
|
|
|
lda #13
|
|
|
|
jsr c64.CHROUT
|
|
|
|
rts
|
|
|
|
}}
|
|
|
|
}
|
2020-12-21 18:19:53 +00:00
|
|
|
|
|
|
|
sub start () {
|
2020-12-21 20:04:29 +00:00
|
|
|
GRAPH_draw_line(1111,2222,3333,4444) ; TODO allocate R0-R15 for the C64 as well (at the bottom of the eval stack hi at $cf00)
|
2020-12-03 17:39:32 +00:00
|
|
|
}
|
2020-08-27 17:47:50 +00:00
|
|
|
}
|