2024-11-30 19:46:31 +00:00
|
|
|
%import textio
|
2024-12-02 20:25:38 +00:00
|
|
|
%import diskio
|
2024-11-30 19:46:31 +00:00
|
|
|
%option no_sysinit
|
|
|
|
%zeropage basicsafe
|
|
|
|
|
2024-11-13 23:54:07 +00:00
|
|
|
main {
|
2024-11-24 06:28:33 +00:00
|
|
|
sub start() {
|
2024-12-02 20:25:38 +00:00
|
|
|
|
2024-12-02 21:05:23 +00:00
|
|
|
if diskio.f_open("lines.txt") {
|
|
|
|
defer diskio.f_close()
|
2024-12-02 20:25:38 +00:00
|
|
|
|
2024-12-02 21:05:23 +00:00
|
|
|
if diskio.f_open_w("@:copy.txt") {
|
|
|
|
defer diskio.f_close_w()
|
2024-12-02 20:25:38 +00:00
|
|
|
|
2024-12-02 21:05:23 +00:00
|
|
|
str buffer = " "*80
|
|
|
|
ubyte length, status
|
|
|
|
do {
|
|
|
|
length, status = diskio.f_readline(&buffer)
|
|
|
|
cbm.CLRCHN()
|
|
|
|
txt.print_uw(length)
|
|
|
|
txt.nl()
|
|
|
|
if length!=0 {
|
|
|
|
if not diskio.f_write(buffer, length)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
} until status!=0
|
2024-12-02 20:25:38 +00:00
|
|
|
}
|
2024-12-02 21:05:23 +00:00
|
|
|
}
|
2024-11-29 23:06:02 +00:00
|
|
|
}
|
2024-11-05 22:56:58 +00:00
|
|
|
}
|