2018-12-11 23:15:05 +00:00
|
|
|
%import c64utils
|
2018-12-22 00:07:43 +00:00
|
|
|
;%import mathlib
|
|
|
|
;%option enable_floats
|
2018-10-16 00:26:35 +00:00
|
|
|
|
2018-12-04 21:30:35 +00:00
|
|
|
~ main {
|
2018-11-11 17:19:08 +00:00
|
|
|
|
2018-12-22 00:07:43 +00:00
|
|
|
;@todo implement the various byte/word division routines.
|
|
|
|
|
|
|
|
;c64scr.PLOT(screenx(x), screeny(y)) ; @todo fix argument calculation of parameters ???!!!
|
2018-12-19 01:51:22 +00:00
|
|
|
|
2018-12-19 02:04:27 +00:00
|
|
|
|
2018-12-22 00:07:43 +00:00
|
|
|
sub start() {
|
2018-12-20 01:52:33 +00:00
|
|
|
|
2018-12-20 22:28:03 +00:00
|
|
|
c64scr.print(" X=")
|
|
|
|
c64scr.print_ub(X)
|
|
|
|
c64.CHROUT('\n')
|
2018-12-19 01:51:22 +00:00
|
|
|
|
2018-12-22 00:07:43 +00:00
|
|
|
word w = c64utils.str2word("000")
|
|
|
|
c64scr.print_w(w)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
w = c64utils.str2word("1")
|
|
|
|
c64scr.print_w(w)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
w = c64utils.str2word("-15000")
|
|
|
|
c64scr.print_w(w)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
w = c64utils.str2word("15000")
|
|
|
|
c64scr.print_w(w)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
c64.CHROUT('\n')
|
2018-12-19 01:51:22 +00:00
|
|
|
|
2018-12-22 00:07:43 +00:00
|
|
|
uword uw = c64utils.str2uword("0")
|
|
|
|
c64scr.print_uw(uw)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
uw = c64utils.str2uword("1")
|
|
|
|
c64scr.print_uw(uw)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
uw = c64utils.str2uword("15000")
|
|
|
|
c64scr.print_uw(uw)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
uw = c64utils.str2uword("65522")
|
|
|
|
c64scr.print_uw(uw)
|
2018-12-21 22:10:45 +00:00
|
|
|
c64.CHROUT('\n')
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
|
2018-12-22 00:07:43 +00:00
|
|
|
byte b = c64utils.str2byte("0")
|
|
|
|
c64scr.print_b(b)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
b=c64utils.str2byte("10")
|
|
|
|
c64scr.print_b(b)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
b=c64utils.str2byte("-10")
|
|
|
|
c64scr.print_b(b)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
b=c64utils.str2byte("-128")
|
|
|
|
c64scr.print_b(b)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
b=c64utils.str2byte("127")
|
|
|
|
c64scr.print_b(b)
|
2018-12-20 22:28:03 +00:00
|
|
|
c64.CHROUT('\n')
|
|
|
|
c64.CHROUT('\n')
|
2018-12-21 22:10:45 +00:00
|
|
|
|
2018-12-22 00:07:43 +00:00
|
|
|
ubyte ub = c64utils.str2ubyte("0")
|
|
|
|
c64scr.print_ub(ub)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
ub=c64utils.str2ubyte("10")
|
|
|
|
c64scr.print_ub(ub)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
ub=c64utils.str2ubyte("10")
|
|
|
|
c64scr.print_ub(ub)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
ub=c64utils.str2ubyte("128")
|
|
|
|
c64scr.print_ub(ub)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
ub=c64utils.str2ubyte("255")
|
|
|
|
c64scr.print_ub(ub)
|
|
|
|
c64.CHROUT('\n')
|
2018-12-21 20:43:35 +00:00
|
|
|
c64.CHROUT('\n')
|
2018-12-18 00:43:04 +00:00
|
|
|
|
2018-12-21 00:06:01 +00:00
|
|
|
c64scr.print(" X=")
|
|
|
|
c64scr.print_ub(X)
|
|
|
|
c64.CHROUT('\n')
|
2018-12-18 00:43:04 +00:00
|
|
|
|
2018-12-04 21:30:35 +00:00
|
|
|
}
|
2018-10-16 20:49:19 +00:00
|
|
|
}
|
2018-12-12 00:13:13 +00:00
|
|
|
|