This guide is intended to aid in the assembly, compiling, and transfering of programs from a host PC to the SBC-2 and Simulator. I've re-written all of my source files to be compatible with the TASS assembler.   A copy of TASS can be downloaded from my site. I am no longer suporting or offering my own DOS Assembler.
Please follow the installation instructions included with TASS for installing TASS on your PC.
Most of my source files use the expanded CMOS 65C02 instruction set. TASS supports this set with
the use of the /c option. Example:
>TASS /c source.asm
The default object files created by TASS have .O64 suffixes. These object files are
preformatted with a two-byte value containing the load address. This will be important
later when its time to transfer your program to the SBC or Simulator. Here is the file structure:
0000: start address low byte
0001: start address hi byte
0002: First byte of user program
0003: second byte of user program
...
Therefore, the file size reported by the PC will always be two bytes higher than the actual size of your code.
TASS -> SBC RAM
If you are building an assembly language program to be uploaded to the SBC's RAM via the PC terminal; then you will need to know how to send a file from your PC's terminal program using the XMODEM CRC protocol. Windows Hyperterm uses menu option Transfer->Send File.   The first step is to assemble your source using TASS and make note of the object file created. Next, at the SBC's Monitor prompt, type U[Enter]. The monitor will respond with a series of "C" characters. Now, access your terminal programs File Upload command, select XMODEM and enter the object file path & name. The file will be transferred to the SBC's RAM starting at the location identified by the first two bytes of the object file. You may now use the monitor command "L" to list the file, or "G" to execute it.
TASS -> Simulator RAM
If you are building an assembly language program for upload to the Simulator's RAM, then you'll
need to modify the TASS object file before loading it into RAM.   First, change the file
extension from ".O64" to ".RAM" (the Simulator's file type.) The Simulator's
[LOAD RAM] button expects the file to contain not only the start address in the first
two bytes, but also expects the length to be included in the next two bytes. Here's
the structure:
0000: start address low byte
0001: start address hi byte
0002: length of file, low byte
0003: length of file, hi byte
0004: First byte of user program
0005: second byte of user program
...
One way of making this change is to use a HEX file editor and insert the two bytes into the file. There are several freeware Hex Editors available from the Internet.
There is a way to "trick" TASS into adding the length bytes into the file during assembly. Here is how it works:
First, you will need to label the first (lowest) address used by your program and add a label at the end of the file as well. Next, you set your org statement (*=) followed by a .word statement containing a subtraction of the end label from the beginning label. After that, place a .logical statement with the same address as your org statement. TASS will compute the file length and insert it into the object file! Here's a small example:
*= $0400 .word filetop-filebot .logical $0400 filebot LDA #$FF ; actual start address is $0400 STA $00 LDX #$FF TXS RTS filetop ; length will be computed as 8 bytes
TASS -> Simulator ROM
Finally, if you want to assemble a new Simulator ROM image, then there are a few changes that will need to be made. First, the file extension for Simulator ROM images is ".rom", so change the ".O64" extension to ".rom". Also, the simulator expects the image file to be exactly 32768 bytes long, reguardless of where you place your IO page. During the loading of the ROM file, the Simulator will ignore any bytes below the IO Page, but if the image file is not 32768 bytes, then the remaining space will not be properly aligned and your RESET Vectors will not be in the right place.
If you can live without the two bytes at $8000 & $8001, then here is the simple fix. Set your org statement (*=) to $8002 and follow it with either a .byte $FF statement or your code. If your code will start above $8002, place another org statement with the actual starting address of your code. The rest of the file can be left as is. Be sure to end with an org $FFFA followed by the three .word commands with the proper system vectors. Now, assemble the program, change the file extension to ".rom", and verify that it is 32768 bytes long.
Here is an example ROM program which will write "HELLO WORLD" to the terminal (IO Page set to $8000).
*= $8002 .byte $ff *= $FF00 Boot ldx #$00 loop lda text,x beq done sta $8010 ; ouput port inx bra loop done bra done ; do nothing text .byte "HELLO WORLD", $0d, $0a, $00 INT rti *= $FFFA NMIvec .word INT RESvec .word Boot IRQvec .word INTThe simulator supports address labels in the debugger mode. To enable these in your own ROM's, add this option to your TASS command line: "\lsim.lbl"  , After a successful assembly, use my "lbl2sym.exe" file to convert the label file to the symbol file. Be sure the ROM and SYM files have the same name. Here is a sample command line sequence:
>TASS /c /lsim.lbl mysource.asm sim.rom ... Successful assembly... >lbl2sys sim.lblYou should now have two files, SIM.ROM & SIM.SYM that can be placed in your Simulator's directory and accessed from the Setup/Configuration Menu.
If you need the entire 32k of ROM, then just set your org to $8000, assemble, then use a Hex File Editor to delete the first two bytes.