2020-12-27 01:22:18 +00:00
|
|
|
%import test_stack
|
|
|
|
%import textio
|
2021-01-10 04:04:56 +00:00
|
|
|
%import diskio
|
2021-01-07 19:01:11 +00:00
|
|
|
%import string
|
2021-01-03 01:45:25 +00:00
|
|
|
%zeropage basicsafe
|
2020-12-08 00:02:38 +00:00
|
|
|
%option no_sysinit
|
|
|
|
|
2020-12-08 21:54:20 +00:00
|
|
|
main {
|
2020-12-21 23:59:07 +00:00
|
|
|
|
2021-01-07 19:01:11 +00:00
|
|
|
sub start() {
|
2021-01-10 04:04:56 +00:00
|
|
|
if diskio.f_open(8, "romdis.asm") {
|
|
|
|
uword buffer = memory("diskbuffer", $1000)
|
2021-01-08 21:43:01 +00:00
|
|
|
|
2021-01-10 04:04:56 +00:00
|
|
|
uword linenr = 0
|
|
|
|
c64.SETTIM(0,0,0)
|
2021-01-08 21:43:01 +00:00
|
|
|
|
2021-01-10 04:04:56 +00:00
|
|
|
while not c64.READST() {
|
|
|
|
ubyte length = diskio.f_readline(buffer)
|
|
|
|
if length {
|
|
|
|
linenr++
|
|
|
|
if not lsb(linenr)
|
|
|
|
txt.chrout('.')
|
|
|
|
} else
|
|
|
|
goto io_error
|
|
|
|
}
|
2021-01-07 19:01:11 +00:00
|
|
|
|
2021-01-10 04:04:56 +00:00
|
|
|
io_error:
|
|
|
|
txt.print("\n\n\n\n\n\n\nnumber of lines: ")
|
|
|
|
txt.print_uw(linenr)
|
|
|
|
txt.nl()
|
|
|
|
diskio.f_close()
|
|
|
|
}
|
2021-01-05 22:19:37 +00:00
|
|
|
|
2021-01-10 04:04:56 +00:00
|
|
|
txt.print(diskio.status(8))
|
2021-01-08 15:56:17 +00:00
|
|
|
txt.nl()
|
2021-01-05 22:19:37 +00:00
|
|
|
|
2021-01-10 04:04:56 +00:00
|
|
|
txt.print("\ntime: ")
|
|
|
|
txt.print_uw(c64.RDTIM16())
|
2021-01-08 15:56:17 +00:00
|
|
|
txt.nl()
|
2020-12-31 15:46:24 +00:00
|
|
|
}
|
2021-01-10 04:04:56 +00:00
|
|
|
|
2020-08-27 17:47:50 +00:00
|
|
|
}
|