2020-08-27 18:47:22 +00:00
|
|
|
%import c64textio
|
2020-08-27 17:47:50 +00:00
|
|
|
%zeropage basicsafe
|
|
|
|
|
|
|
|
main {
|
|
|
|
sub start() {
|
2020-08-28 23:44:20 +00:00
|
|
|
|
2020-08-29 21:55:26 +00:00
|
|
|
;asmsub clear_screen (ubyte char @ A, ubyte color @ Y) clobbers(A) { ...}
|
|
|
|
; TODO dont cause name conflict if we define sub or sub with param 'color' or even a var 'color' later.
|
2020-08-28 23:44:20 +00:00
|
|
|
|
2020-08-29 21:55:26 +00:00
|
|
|
; sub color(...) {}
|
|
|
|
; sub other(ubyte color) {} ; TODO don't cause name conflict
|
2020-08-28 23:44:20 +00:00
|
|
|
|
2020-08-28 21:28:21 +00:00
|
|
|
byte b1
|
|
|
|
byte b2
|
|
|
|
byte b3
|
2020-08-27 17:47:50 +00:00
|
|
|
|
2020-08-28 21:28:21 +00:00
|
|
|
word w1
|
|
|
|
word w2
|
|
|
|
word w3
|
2020-08-27 18:47:22 +00:00
|
|
|
|
2020-08-28 21:28:21 +00:00
|
|
|
|
|
|
|
b2 = 13
|
|
|
|
b3 = 100
|
|
|
|
b1 = b3 / b2
|
|
|
|
txt.print_b(b1)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
|
|
|
|
b2 = -13
|
|
|
|
b3 = 100
|
|
|
|
b1 = b3 / b2
|
|
|
|
txt.print_b(b1)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
|
|
|
|
b2 = 13
|
|
|
|
b3 = -100
|
|
|
|
b1 = b3 / b2
|
|
|
|
txt.print_b(b1)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
|
|
|
|
b2 = -13
|
|
|
|
b3 = -100
|
|
|
|
b1 = b3 / b2
|
|
|
|
txt.print_b(b1)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
|
|
|
|
|
|
|
|
b2 = 13
|
|
|
|
b3 = 100
|
|
|
|
b3 /= b2
|
|
|
|
txt.print_b(b3)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
|
|
|
|
b2 = -13
|
|
|
|
b3 = 100
|
|
|
|
b3 /= b2
|
|
|
|
txt.print_b(b3)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
|
|
|
|
b2 = 13
|
|
|
|
b3 = -100
|
|
|
|
b3 /= b2
|
|
|
|
txt.print_b(b3)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
|
|
|
|
b2 = -13
|
|
|
|
b3 = -100
|
|
|
|
b3 /= b2
|
|
|
|
txt.print_b(b3)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
w2 = 133
|
|
|
|
w3 = 20000
|
|
|
|
w1 = w3 / w2
|
|
|
|
txt.print_w(w1)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
|
|
|
|
w2 = -133
|
|
|
|
w3 = 20000
|
|
|
|
w1 = w3 / w2
|
|
|
|
txt.print_w(w1)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
|
|
|
|
w2 = 133
|
|
|
|
w3 = -20000
|
|
|
|
w1 = w3 / w2
|
|
|
|
txt.print_w(w1)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
|
|
|
|
w2 = -133
|
|
|
|
w3 = -20000
|
|
|
|
w1 = w3 / w2
|
|
|
|
txt.print_w(w1)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
|
|
|
|
|
|
|
|
w2 = 133
|
|
|
|
w3 = 20000
|
|
|
|
w3 /= w2
|
|
|
|
txt.print_w(w3)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
|
|
|
|
w2 = -133
|
|
|
|
w3 = 20000
|
|
|
|
w3 /= w2
|
|
|
|
txt.print_w(w3)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
|
|
|
|
w2 = 133
|
|
|
|
w3 = -20000
|
|
|
|
w3 /= w2
|
|
|
|
txt.print_w(w3)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
|
|
|
|
w2 = -133
|
|
|
|
w3 = -20000
|
|
|
|
w3 /= w2
|
|
|
|
txt.print_w(w3)
|
2020-08-27 17:47:50 +00:00
|
|
|
c64.CHROUT('\n')
|
|
|
|
}
|
|
|
|
}
|