Skip to content

Instantly share code, notes, and snippets.

View davidgiven's full-sized avatar

David Given davidgiven

View GitHub Profile
@davidgiven
davidgiven / cpm.bas
Created May 31, 2023 21:43
This is a very barebones CP/M port for the Agon Light, using the BBC BASIC assembler to do all the work.
10 bbase=&FD00
20 fbase=bbase-3584
30 cbase=fbase-2048
40 iobyte=&0003
50 cdisk=&0004
60 bdoscall=&0005
70 bioscall=&0000
80 DIM code 4096
90 FOR pass=4 TO 7 STEP 3
100 P%=0
int func(int i, int j) {
if (i)
j++;
return j;
}
_func:
push iy
ld iy, 0
add iy, sp
00000000 0F 07 0D 05 0B 03 09 01 0E 06 0C 04 0A 02 08 00 ................
00000010 00 80 20 A0 40 C0 60 E0 10 90 30 B0 50 D0 70 F0 .. .@.`...0.P.p.
00000020 A0 00 20 3A 03 A0 00 84 73 84 74 C8 84 71 A0 00 .. :....s.t..q..
00000030 20 CB 03 A5 71 20 40 03 A4 71 20 CB 03 88 B1 73 ...q @..q ....s
00000040 AA 4A 4A 4A 4A 85 70 8A 29 0F AA A9 04 8D 00 18 .JJJJ.p.).......
00000050 2C 00 18 F0 FB 2C 00 18 D0 00 D0 00 8E 00 18 8A ,....,..........
00000060 2A 29 0F 8D 00 18 A6 70 BD 00 03 8D 00 18 EA 2A *).....p.......*
00000070 29 0F C0 00 8D 00 18 D0 C4 F0 43 A0 01 20 89 03 ).........C.. ..
00000080 85 71 A8 20 89 03 A4 71 60 20 CB 03 48 68 A9 04 .q. ...q` ..Hh..
00000090 2C 00 18 F0 FB EA EA EA AD 00 18 0A EA EA EA EA ,...............

Welcome to WordGrinder

Important note for Windows users

WordGrinder is a port of a Unix program, and a few things don’t map well onto the way Windows works. There are some things you need to know.

  • the mouse is ignored. WordGrinder is keyboard driven.
  • the close button at the top right hand corner of the window won’t work. Instead, to quit, type CTRL+Q (or press ESC to open the menu and pick File_→_Quit).
We couldn’t find that file to show.