I recently started working on moving some of the standard utility programs for DOS/65 over to the my current CMOS implementation on my prototype C02 Pocket SBC, which uses a Microdrive for storage and has a Maxim RTC (which is not being used by DOS/65 as of yet).
Initially, there were a few utilities that Rich Leary had included in the ROM V3 code:
Super Directory V103
User Copy V302
Submit V300
SysGen V302
I made some changes to the above (sans SysGen) and had those running without much work. I also made minimal changes to the Xmodem file transfer utility which is quite useful for getting data back and forth.
Other utilities that are supplied with the V2 code included:
Alloc - shows disk map block allocation usage
ASM - 6502 (no CMOS support) 2-pass Assembler (creates KIM hex files and a listing file)
EDIT - line editor
COMPL - Basic Compiler (creates a .INT file for the runtime interpreter)
RUN - Run interpreter for the Basic Compiler
MKCOM - converts KIM hex files to .COM files
DEBUG - Code debugger (requires some changes based on specific hardware)
SYSGEN - also somehwat specific to a particular hardware platform
COPY - Basic file copy
COMPR - File compare
I made the required changes to the Assembler and MakeCOM utilities to assemble/link using WDC Tools, which wasn't too difficult. Once those were working and moved over, I was able to assemble all of the above utilities without issue. Note that I did need to make some basic configuration changes so they would work. The larger utilities are the Basic compiler and Runtime interpreter... both of these have large page zero requirements, the latter being a bit more. In short, 136 bytes required to run. I had to change the config for DOS/65 and relocated it's Page Zero usage and free up another 8 bytes, then make another change to the compiler/interpreter to start at location $00 for it's usage. It just fits! Between the C02BIOS, C02Monitor, DOS/65 and Runtime, there's only a single page zero location that is not being used!
I'm still doing some testing and will likely make some changes as I continue working on these. I've only got a simple Mandelbrot Basic program running. Performance seems pretty good, but I'll need to grab another C02 Pocket and put an older config that includes EnHanced Basic to compare to. The program I'm using is from BillO, IIRC... with a couple minor changes.
Code:
5 BENCHST=CALL (65325)
10 MAXITER=20
20 LET C$=" .,'~!^:;[/<&?oxOX# "
30 FOR Y=-39 TO 39
40 FOR X=-39 TO 39
50 CREAL=X/20
70 CIMAG=Y/20
80 ZREAL = CREAL
90 ZIMAG = CIMAG
95 COUNT = 1
100 ZM = ZREAL*ZREAL
105 ZN = ZIMAG*ZIMAG
107 ZL = ZM+ZN
110 IF ZL>4 THEN GOTO 170
120 Z2=ZM-ZN+CREAL
130 ZIMAG=ZREAL*ZIMAG*2+CIMAG
140 ZREAL=Z2
150 COUNT=COUNT+1
160 IF COUNT<MAXITER THEN GOTO 100
170 PRINT MID$(C$,1+COUNT,1);
180 NEXT X
185 PRINT ""
190 NEXT Y
195 BENCHQT=CALL (57371)
200 END
Lines 5 and 195 are added by me. They invoke the BIOS benchmark timer, which shows 87.87 seconds to complete the program run. The Basic Compiler has an usual CALL command, hence creating a name that references it.
The assembler seems reasonably quick... as the Microdrive performance is quite good and the CPU is running at 8MHz. The Basic Compiler assembled in 94 seconds, and is 3454 lines of code. The generated listing file, which includes the symbol table is 5963 lines long. Files sizes on DOS/65 show as 82KB for the .ASM, 26KB for the .KIM and 162KB for the .PRN (listing file). Longer term view on the assembler is to add all of the CMOS instructions and addressing modes, but who knows how long that will take.
More testing is certainly required... but the next 24 hours or so might render me in the dark with Ian heading towards the state. Granted, I'm on the east coast, but that won't matter much with such a large storm... we're already getting lots of rain!