2019-07-15 01:57:51 +00:00
|
|
|
%import c64flt
|
2019-07-01 21:41:30 +00:00
|
|
|
%zeropage basicsafe
|
2019-07-15 01:57:51 +00:00
|
|
|
%option enable_floats
|
2019-03-29 01:13:28 +00:00
|
|
|
|
2019-03-19 00:22:26 +00:00
|
|
|
~ main {
|
2019-04-21 01:04:13 +00:00
|
|
|
|
2019-07-15 21:05:04 +00:00
|
|
|
sub start() {
|
2019-07-28 22:33:19 +00:00
|
|
|
ubyte zz
|
|
|
|
|
|
|
|
carry(0, 0)
|
|
|
|
carry(1, 1)
|
|
|
|
|
|
|
|
A=0
|
|
|
|
carry(2, A)
|
|
|
|
A=1
|
|
|
|
carry(3, A)
|
|
|
|
|
|
|
|
zz=0
|
|
|
|
carry(4, zz)
|
|
|
|
zz=122
|
|
|
|
carry(5, zz)
|
|
|
|
|
|
|
|
carry(6, zz-122)
|
|
|
|
carry(7, zz+34)
|
|
|
|
|
|
|
|
ubyte endX = X
|
|
|
|
if endX == 255
|
|
|
|
c64scr.print("\n\nstack x ok!\n")
|
|
|
|
else
|
|
|
|
c64scr.print("\n\nerror: stack x != 255 !\n")
|
2019-07-16 21:34:43 +00:00
|
|
|
|
2019-07-28 21:37:33 +00:00
|
|
|
; ubyte bb = @($d020)+4
|
|
|
|
; ubyte bb2 = @($d020+A)+4
|
|
|
|
;
|
|
|
|
; subje(55)
|
|
|
|
; subje(@($d020+bb))
|
|
|
|
; subje(A)
|
|
|
|
; subje(bb)
|
|
|
|
; subje(bb+43)
|
|
|
|
}
|
2019-07-28 19:29:49 +00:00
|
|
|
|
2019-07-28 22:33:19 +00:00
|
|
|
asmsub carry(byte offset @Y, ubyte cc @Pc) {
|
|
|
|
%asm {{
|
|
|
|
bcc +
|
|
|
|
lda #1
|
|
|
|
sta $0400,y
|
|
|
|
rts
|
|
|
|
+
|
|
|
|
lda #0
|
|
|
|
sta $0400,y
|
|
|
|
rts
|
|
|
|
}}
|
2019-07-28 21:37:33 +00:00
|
|
|
}
|
2019-07-22 16:58:55 +00:00
|
|
|
|
2019-07-28 21:37:33 +00:00
|
|
|
sub subje(ubyte arg) {
|
|
|
|
A=arg
|
2019-07-22 16:58:55 +00:00
|
|
|
}
|
2019-04-11 22:04:15 +00:00
|
|
|
}
|