• Please review our updated Terms and Rules here

Assembling Grant Searle's ExBasROM.asm and burning to ROM?

ncherry

Experienced Member
Joined
Mar 4, 2018
Messages
112
Location
Monroe Twp, NJ
Short:
How did you burn the ExBasROM (modified CoCo BASIC) into the SBC's 16K ROM? Not how you used an PROM burner, I have lots of experience with that but how did you fit the file (which is starting at $007C, not $DB00) into the 16K ROM (which starts at $C000)?

Long:
I've built a Grant Searle 6 chip Motorola 6809 (7 chip actually) SBC and I'm quite happy with the board. So in preparation to power up the board I've assembled the ExBasROM code. I've assembled the source with as9. I've tested the S19 file with a 6809 emulator, it works.

So far, so good.

So I have a nice 28C256, minipro (Linux) and TL866II+. I've erased the chip and it checks clean. So I'm getting ready to burn the S19 and I find this little gem:

Code:
S10A007C0C8426020C83B67C
S10600857EDCBF5B

First line shown is at address of $007C ($0A + $06 bytes). RAM starts at $0 (thru $7FFF). ROM at $C000, code starts at $D800 through $FFFF. That code in the listing (below) is

Code:
0107 007a                    EXECJP    RMB  2              LB4AA 
0108                                                        
0109                         * THIS ROUTINE PICKS UP THE NEXT INPUT CHARACTER FROM                      
0110                         * BASIC. THE ADDRESS OF THE NEXT BASIC BYTE TO BE                      
0111                         * INTERPRETED IS STORED AT CHARAD.                      
0112 007c 0c 84              GETNCH    INC  <CHARAD+1      *PV INCREMENT LS BYTE OF INPUT POINTER 
0113 007e 26 02                        BNE  GETCCH         *PV BRANCH IF NOT ZERO (NO CARRY) 
0114 0080 0c 83                        INC  <CHARAD        *PV INCREMENT MS BYTE OF INPUT POINTER 
0115 0082 b6                 GETCCH    FCB  $B6            *PV OP CODE OF LDA EXTENDED 
0116 0083                    CHARAD    RMB  2              *PV THESE 2 BYTES CONTAIN ADDRESS OF THE CURRENT 
0117                         *         *    CHARACTER WHICH THE BASIC INTERPRETER IS  
0118                         *         *    PROCESSING      
0119 0085 7e dc bf                     JMP  BROMHK         JUMP BACK INTO THE BASIC ROM 
0120                                                        
0121 0088                    VAB       RMB  1              = LOW ORDER FOUR BYTES OF THE PRODUCT

I can't find any code that copies the bytes out of the ROM to the RAM. Yup, self modifying. I can modify the code to copy it down but I'm checking to see if anyone has already done this. I'll test this on the sbc09 emulator.
 
The code to copy from ROM to RAM is already in the source.
LDX #LA10D POINT X TO ROM SOURCE DATA
LDU #LPTCFW POINT U TO RAM DESTINATION
LDB #18 MOVE 18 BYTES
JSR LA59A MOVE 18 BYTES FROM ROM TO RAM

The values to be copied are at LA10D
* THESE BYTES ARE MOVED TO ADDRESSES $76 - $85 THE DIRECT PAGE
LA10D FCB 16 TAB FIELD WIDTH
FCB 64 LAST TAB ZONE
FCB 80 PRINTER WIDTH
FCB 0 LINE PRINTER POSITION
FDB LB44A ARGUMENT OF EXEC COMMAND - SET TO ëFCí ERROR
* LINE INPUT ROUTINE
INC CHARAD+1
BNE LA123
INC CHARAD
LA123 LDA >0000
JMP BROMHK

joe
 
Thanks, I found that code late last night. I've edited the .s19 file and removed the 2 lines that occur before $C000. I'm about to boot the board for the first time. I'll clean up the asm file later to get that corrected.

Now on to finding out if my CPUs are any good.
 
Working Grant Searle 6809 SBC

Working Grant Searle 6809 SBC

I now have a good image (had a bad image) and a good CPU (68B09). I have the combined image running (Jeff Tranter's software - Assist09, Trace, Disassembler and modified CoCo Extended Basic) running and it works. :)

One thing I had to do was remove the S1 lines before C000 (Combined has BASIC starting at C000 instead of D800). These lines were in the RAM area. I'll fix the code and add it to my Github account.

Forgot the Github link:
https://github.com/linuxha/6809
https://github.com/linuxha/sbc09

First link is Jeff's code, the second is a 6809 emulator. I haven't publish my updates yet but I will. Eventually I'll combine them together so it's all under one repo.
 
Last edited:
I now have a good image (had a bad image) and a good CPU (68B09). I have the combined image running (Jeff Tranter's software - Assist09, Trace, Disassembler and modified CoCo Extended Basic) running and it works. :)

One thing I had to do was remove the S1 lines before C000 (Combined has BASIC starting at C000 instead of D800). These lines were in the RAM area. I'll fix the code and add it to my Github account.

Forgot the Github link:
https://github.com/linuxha/6809
https://github.com/linuxha/sbc09

First link is Jeff's code, the second is a 6809 emulator. I haven't publish my updates yet but I will. Eventually I'll combine them together so it's all under one repo.

Good one, I had no idea about this trick. Make sense if it works pretty well. Thanks!
 
Once I fix a bad solder joint on a pull up the board starts up every time. It starts in ASSIST09, the I run 'G C000' and I'm in BASIC. :) I'm now trying to understand the Forth code and how to use it. I know nothing about Forth. I see that the eForth code works with the v09s (loads at start address 0100).

I've started putting my notes here:
https://ushomeautomation.com/Projects/sbc-68B09/index.html
 
I now have a good image (had a bad image) and a good CPU (68B09). I have the combined image running (Jeff Tranter's software - Assist09, Trace, Disassembler and modified CoCo Extended Basic) running and it works. :)

One thing I had to do was remove the S1 lines before C000 (Combined has BASIC starting at C000 instead of D800). These lines were in the RAM area. I'll fix the code and add it to my Github account.

Forgot the Github link:
https://github.com/linuxha/6809
https://github.com/linuxha/sbc09-Upsers

First link is Jeff's code, the second is a 6809 emulator. I haven't publish my updates yet but I will. Eventually I'll combine them together so it's all under one repo.

Anyone ?
 
Well I've been POKE'ng around a bit more and found that when making the hex files the Motorola s19 files have the full code (the RAM and ROM segments) but the Intel .hex files do not contain the RAM segments. I guess I was just being difficult expecting to use the Motorola .s19 files on a Motorola processor. ;-)

I'm now playing with srec_cat and outputing the results to .bas files. I'll add this to my notes. At the moment it appears I have the terminal boxes a bit messed up size wise. I'll worry about that a bit later. Notes first.
 
Here's what I've done with the Makefile for combined.

Code:
ccombined.s19: combined.asm
	as9 combined.asm -l s19 now
	@# Not sure if there is a better way but this assures bash
	@# Add S0 information
	bash -c 'export STR=$$(./s0.sh "ExBasROM and Assist09 combined");sed -i "1i $${STR}" combined.s19'
	mv combined.s19 combined-a.s19
	srec_cat combined-a.s19 -Motorola -crop 0xc000 0x10000 -output combined.s19 -Motorola
	bash -c 'export STR=$$(./s9.sh "C000");sed -i -e "\$$a$${STR}" combined.s19'
	srec_info combined.s19

I've created the s0.sh and s9.sh to add an s0 record and s9 record. Neither are important and can be commented out. I was curious and decided to create the scripts. You'll end up with srec_info warnings but they're not errors.

Code:
$ rm combined.s19  ; make combined.s19
as9 combined.asm -l s19 now
bash -c 'export STR=$(./s0.sh "ExBasROM and Assist09 combined");sed -i "1i ${STR}" combined.s19'
mv combined.s19 combined-a.s19
srec_cat combined-a.s19 -Motorola -crop 0xc000 0x10000 -output combined.s19 -Motorola
bash -c 'export STR=$(./s9.sh "C000");sed -i -e "\$a${STR}" combined.s19'
srec_info combined.s19
Format: Motorola S-Record
Header: "ExBasROM and Assist09 combined"
Execution Start Address: 0000C000
Data:   C000 - E3D9
        E400 - EFD0
        F000 - F6F1
        F800 - FFFF
$
 
Back
Top