The minimal 68030 computer has 512K of RAM and a simple serial port. Here is the memory map of stage 2 68030 computer:
- RAM 0x0-0x7FFFF
- Serial port transmit/receive: 0xFFFFF000
- Serial port status 0xFFFFF001
- Bit 0 is TxEmpty, transmit buffer empty when high
- Bit 1 is RxRdy, receive data ready when high
A very simple program to output 'hello world' on console looks like this:
org 0 dc.l $80000 ;define stack dc.l start start: lea signon,a0 ;point to sign on message chktxempty: btst.b #0,$FFFFF001 ;test for transmit buffer empty beq chktxempty move.b (a0)+,$FFFFF000 ;write next character to console bne chktxempty ;until null terminator bra * ;spin forever here signon: dc.b $a,$d,'Hello World!!!!!',0 endThe assembler for this code is EASy68K. The EASy68K tool chain has an utility, EASyBIN, that can convert S-record to binary format and fills the file to specified length which is 0xFF in this case. This way the program will start running as soon as file loading is completed.
OK, now that 68030 can receive a 255-byte program and execute it, let us write a 255-byte S-record loader. This simple loader will load a S-record file and start program execution from 0x400 when loading is done. To test this loader, I modified the above 'hello world' program so it starts from 0x400. First load the S-record loader, and then load helloworld_400.
That works, so I will now load and execute a memory diagnostic that checks the 1/2 meg RAM from 0x1000 to 0x7FFFF. The program and stack reside below 0x1000 so that part of the memory can't be checked with the diagnostic. First load the S-record loader, then load tstmem.s68
That works well, now I'm ready to load a real application, Lee Davison's EhBASIC for 68000. This program is available for download from EASy68K website. The source code is modified slightly to accommodate the simple serial port. Once EhBASIC is loaded and running, I will load a ASCII mandelbrot program and run it under EhBASIC.