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-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
|
|
|
|
|
|
|
|
errors {
|
|
|
|
sub tofix() {
|
|
|
|
|
2020-12-08 20:29:40 +00:00
|
|
|
repeat {
|
|
|
|
ubyte char3 = c64.CHRIN()
|
2020-12-08 20:56:40 +00:00
|
|
|
if_cc
|
|
|
|
break
|
|
|
|
|
2020-12-08 20:29:40 +00:00
|
|
|
if_z
|
2020-12-08 20:56:40 +00:00
|
|
|
char3 ++
|
|
|
|
else
|
|
|
|
break
|
|
|
|
|
|
|
|
char3--
|
2020-12-08 20:29:40 +00:00
|
|
|
}
|
|
|
|
labeltje:
|
|
|
|
|
|
|
|
|
2020-12-08 00:02:38 +00:00
|
|
|
while c64.CHRIN() {
|
|
|
|
; TODO: the loop condition isn't properly tested because a ldx is in the way before the beq
|
|
|
|
}
|
|
|
|
|
|
|
|
repeat {
|
|
|
|
ubyte char2 = c64.CHRIN()
|
|
|
|
if char2==0 ; TODO condition not properly tested after optimizing because there's only a sta char2 before it (works without optimizing)
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
; TODO fix undefined symbol:
|
|
|
|
repeat {
|
|
|
|
ubyte char = c64.CHRIN()
|
|
|
|
; ...
|
|
|
|
}
|
|
|
|
; do {
|
|
|
|
; char = c64.CHRIN() ; TODO fix undefined symbol error, should refer to 'char' above in the subroutine's scope
|
|
|
|
; } until char==0
|
|
|
|
|
2020-12-08 01:16:41 +00:00
|
|
|
; TODO fix compiler crash:
|
|
|
|
; str[max_files] names
|
2020-12-08 00:02:38 +00:00
|
|
|
}
|
|
|
|
}
|
2020-08-27 17:47:50 +00:00
|
|
|
|
2020-09-24 17:26:07 +00:00
|
|
|
main {
|
2020-10-09 20:47:42 +00:00
|
|
|
sub start() {
|
2020-12-08 20:29:40 +00:00
|
|
|
errors.tofix()
|
2020-12-08 02:28:29 +00:00
|
|
|
test_stack.test()
|
2020-12-03 17:39:32 +00:00
|
|
|
}
|
2020-08-27 17:47:50 +00:00
|
|
|
}
|