I've ported the Apple-1 built-in monitor program: WozMon.gcl
The original is 254 bytes, my version is $254 bytes . About half of that is for terminal output (character printing). The Apple-1 had dedicated hardware for that...
This is an extension of the earlier Terminal.gcl program that just echoed typed characters to the screen. Now you can inspect memory locations, write to them and execute code. Original WozMon tutorials should be valid as I tried to deviate as little as possible from the original: the differences are essentially cosmetic or slightly improved usability. You will need such tutorial to understand what is going on, because the command interface is VERY TERSE. I could't figure it out by myself in the Apple-1 emulators. Once you "get" it, it is pretty easy.
I'm not aware of an emulator that can simulate an ASCII keyboard yet, so try it on hardware.
Update: I have integrated it also as the terminal application in the Arduino interface sketch. With that a hooked-up keyboard can inject WozMon at a single keystroke. The sketch is renamed as "BabelFish" because that better conveys what it does: translating all kinds of signals. And "LoaderTest" was a boring name to begin with...
Woz Monitor ported
Forum rules
Be nice. No drama.
Be nice. No drama.
Re: Woz Monitor ported
Excellent work Marcel,
I'm looking forward to trying this.
I'm looking forward to trying this.
Re: Woz Monitor ported
Some magic spells...
Double the LED sequence speed:
Very slow LED sequence speed:
Momentarily switch off the LEDs (until the sequencer makes its next step):
Replay the startup sound for 2 seconds (120 frames):
Shift screen 8 pixels to the right:
Shift bottom half of screen 8 pixels to the right:
Restart Woz monitor:
Continuously blink a pixel:
Double the LED sequence speed:
Code: Select all
2f:5
Code: Select all
2f:ff
Code: Select all
14:0
Code: Select all
2c:78
Code: Select all
101:f8
Code: Select all
177:f8
Code: Select all
200R
Code: Select all
500
:11 0 8
:2b 50 f0 50 e3 1 90 3R
Re: Woz Monitor ported
Someone inquired about built-in routines you can call from the WozMon. I figure I should share my reply here:
Like the Apple-1, the Gigatron’s RAM is in a virgin state after starting WozMon. However, typical tutorials refer to routines present in the monitor itself, and there some similar ones in our version:
0216 PrintChar — prints character in vAC
0266 CNewLine — conditional newline (newline if not already at start of line)
026b NewLine — unconditional newline (simply skips the test)
02b3 PrintByte — print hex value of byte in vAC
Unlike the original WozMon, you can actually call these safely directly with the 'R' command. But although you can call them like that, it isn’t of much use it self. You can better use them from a vCPU assembly program you toggle in first.
The CALL instruction is 0xCF, and it reads the address from a zero page variable.
PrintChar is in 0x38/39
CNewline is in 0x3a/3b
Newline doesn’t have an variable set by WozMon
PrintByte is in 0x3c/3d
You can check that as follows:
Example program I just made up:
To key this in and run it, you do:
This stuff is really going back to 1976..
Like the Apple-1, the Gigatron’s RAM is in a virgin state after starting WozMon. However, typical tutorials refer to routines present in the monitor itself, and there some similar ones in our version:
0216 PrintChar — prints character in vAC
0266 CNewLine — conditional newline (newline if not already at start of line)
026b NewLine — unconditional newline (simply skips the test)
02b3 PrintByte — print hex value of byte in vAC
Unlike the original WozMon, you can actually call these safely directly with the 'R' command. But although you can call them like that, it isn’t of much use it self. You can better use them from a vCPU assembly program you toggle in first.
The CALL instruction is 0xCF, and it reads the address from a zero page variable.
PrintChar is in 0x38/39
CNewline is in 0x3a/3b
Newline doesn’t have an variable set by WozMon
PrintByte is in 0x3c/3d
You can check that as follows:
Example program I just made up:
Code: Select all
0500 75 // PUSH
0501 CF 3A // CALL CNewLine
0503 59 61 // LDI 0x61 (‘a')
0505 2B 50 // STW 0x50
0507 21 50 // LDW 0x50
0509 CF 38 // CALL PrintChar
050B 93 50 // INC 0x50
050D 21 50 // LDW 0x50
050F 8c 7b // XORI 0x7b (‘z’+1)
0511 35 72 05 // BNE 0x0507
0514 63 // POP
0515 FF // RET
This stuff is really going back to 1976..