This page will help you set up the free TASM Assembler and free XVI32 Hex editor in Programmer’s Notepad
(I’m looking into doing this with Notepad++ too for those that prefer to use that)
Assembler:
I’m now using the free TASM assembler by Squak Valley Software, their home page ( www.tasmhome.com ) does not seem to be active anymore and I could not find a way to contact them to request permission to host a copy of TASM, I am therefore going to host it until requested otherwise.
There is no installation for the TASM, you just need to put it somewhere easily accessible, preferably in a path with no spaces in the name. (I have it on my dropbox in a z80 folder, I use the DOS “SUBST” command to create a Z: drive which is the Z80 folder. I will make a page showing you how to do this soon):
- In Programmer’s Notepad go to Tools -> Options
- In the Dialogue box, select Tools
- In the Scheme drop-down, select Assembler and click on Add.
- Copy the same details as shown into your dialogue. Name can be whatever you wish, and Command must point to the correct location for you copy of TASM.EXE
- You need to copy the TASM80.TAB file into the folder of the assembly files you are assembling, I still haven’t found a way around this yet unfortunately.
- The current file shown will be sent to the assembler, so if you have a driver shown and select assemble in the menu, it will most likely fail and give you a lot of errors. (I’m going to figure out how to set up projects and doing project assembling using programmer’s notepad eventually)
A little explanation of the parameters used:
- -80 Tells TASM that we are assembling for the Z80 (This assembler supports multiple processors)
- -x use extended instruction set if available (Not needed for the Z80 but I never bothered removing it)
- -g3 select binary format for output (as opposed to Motorola or Intel, etc…)
- -c Tells TASM that the code is written as a contiguous block (makes sure the output binary file is padded with 0x00’s when there is a gap in the addresses in the assembly code, such as when you use .ORG to specify the location of the next block of code to start)
- %f This is replaced by Programmer’s Notepad to become the current filename, this is specifying the input file into TASM
- %n.bin The %n is replaced by Programmer’s Notepad to be the current filename with it’s extension stripped, and I added .bin to the end as I wish for a .bin extension to my output file, this specifies the output filename for TASM to assemble to.
If I was working on m62bios.asm and selected the assemble command in the menu, it would run this command:
z:\ASM\tasm32\TASM.EXE -80 -x -g3 -c m62bios.asm m62bios.bin
If you choose to change the extension of your output binary, replace the .bin in the parameter with your choice, but make sure the “Open with XVI32” command is changed accordingly as that is set to use .bin