Devpac80 Companion cover: MON80, HiSoft's monitor, showing the companion's SUM program disassembled on the Tatung Einstein
← Back to Modules
module
10

Appendix II - From z80asm To GEN80

Everything that changes when a program from the assembly course goes to GEN80, on one page. S6 explains each.

What Changes

The assembly course writesFor GEN80, writeBecause
ORG 256nothingGEN80 starts at 100h; ORG 256 works but warns ORGs used
LD A,'H'LD A,"H"'H' is Bad expression
DEFB 'A'DEFB "A"as above
DEFB 'HELLO',0DEFM "HELLO" then DEFB 0 on the next lineDEFB takes no strings
-never DEFM "HELLO",0GEN80 ignores everything after the string: no 0, and no error
DEFB 'H','E',0DEFB "H","E",0characters in double quotes
include 'vdp.asm'*I VDP in the first column, for VDP.GENinclude is Bad mnemonic
labels longer than 10 characterslabels that differ in their first 10only 10 count: Redefined symbol
labels in mixed casethe same spelling everywherelabels are case-sensitive

What Does Not

Unchanged, and safe to type as the assembly course printed it:

  • labels with a colon (GEN80 also takes them without)
  • decimal, 41h, 0FFh, 01000001b (and GEN80 also takes #41, %01000001)
  • $, EQU, DEFW, DEFS
  • + - *, with * done first, unary minus, LABEL+1
  • (HL), (IX+5), (4000h), JR, DJNZ, RST 8, RST 08h
  • lower-case mnemonics and registers
  • comments after ;

When It Goes Wrong

GEN80 saysLook for
Bad expressionsingle quotes; a string after DEFB
Bad mnemonica misspelt instruction; include
Symbol is Reserved Word*I not in the first column
Redefined symbola label twice - or two long labels alike in their first 10 characters
*WARNING* NAME absenta label spelt differently, or in different case, where it is used
*WARNING* ORGs usedan ORG - harmless
no message, wrong outputa DEFM with something after the string

After any error or absent warning, do not run the program: GEN80 has left the old .COM empty (S5).

Get the Newsletter

New guides, disk images and community finds, roughly once a quarter. No spam, we promise, this isn't Tatung's marketing department.
Your subscription could not be saved. Please try again.
Your subscription has been successful.

Newsletter

Subscribe to our newsletter and stay updated.