----------------------------------------
-- dZ80 configuration file
----------------------------------------

----------------------------------------
-- Disassembly control
----------------------------------------

cpu="z80"
inputfile="SA-5510.bin"
outputfile="SA-5510.asm"
--fileheadersize=27
filebaseaddr=4605
disstart=0
disend=16946
--disstart=0
--disend=3584
--quiet=0
labelledoutput=1

----------------------------------------
-- Layout
----------------------------------------

labelreference=1
addresscolumn=1
opcodecolumn=1
relativejumpcomment=1
uppercase=1
autoblanklines=1
db="db"
comment="; "
radix=16
numprefix="0"
numsuffix="H"

----------------------------------------
-- Scripts
----------------------------------------

--script="scripts\\spectrum.lua"

----------------------------------------
-- References
----------------------------------------

referencefile="SA-5510.ref"
inportreference=1
outportreference=1
addressreference=1
indirectaddressreference=1
limitreferences=1

----------------------------------------
-- Opcode mapfile and code/data areas
----------------------------------------

--opmapfile="mayhem.map"

-- Code Region isnt required as v2.x sets the entire region to code unless a data region overrides it.
-- d_SetCodeRegion(4608, 2464)

-- Set the known data regions, either as a data region (byte), word or string. The type affects the assembly output definitions and word
-- regions will attempt to map to an address, ie. jump tables will be setup with labels rather than constants.
d_SetDataRegion(  hex("1347"),     100)    -- 0x1347
d_SetStringRegion(hex("1347"),     28)
d_SetStringRegion(hex("1364"),     31)
d_SetStringRegion(hex("1384"),      5)
d_SetStringRegion(hex("138A"),      6)
d_SetStringRegion(hex("1391"),      3)
d_SetStringRegion(hex("1395"),      6)
d_SetStringRegion(hex("139C"),      6)
d_SetDataRegion(  hex("2FC2"),     30)  
d_SetStringRegion(hex("2FC2"),      6)
d_SetStringRegion(hex("2FC9"),      8)
d_SetStringRegion(hex("2FD2"),     10)
d_SetStringRegion(hex("2FDD"),      2)
d_SetStringRegion(hex("1D44"),      9)

-- Reserved key words.
d_SetDataRegion(  hex("15A8"),    402)     -- 0x15A8 Start of tokens.
d_SetStringRegion(hex("15A8"),      2)     --  0 - REM
d_SetStringRegion(hex("15AB"),      3)     --  1 - DATA
d_SetStringRegion(hex("15AF"),      0)     --  2 - undefined
d_SetStringRegion(hex("15B0"),      0)     --  3 - undefined
d_SetStringRegion(hex("15B1"),      3)     --  4 - READ
d_SetStringRegion(hex("15B5"),      3)     --  5 - LIST
d_SetStringRegion(hex("15B9"),      2)     --  6 - RUN
d_SetStringRegion(hex("15BC"),      2)     --  7 - NEW
d_SetStringRegion(hex("15BF"),      4)     --  8 - PRINT
d_SetStringRegion(hex("15C4"),      2)     --  9 - LET
d_SetStringRegion(hex("15C7"),      2)     -- 10 - FOR
d_SetStringRegion(hex("15CA"),      1)     -- 11 - IF
d_SetStringRegion(hex("15CC"),      3)     -- 12 - THEN
d_SetStringRegion(hex("15D0"),      3)     -- 13 - GOTO
d_SetStringRegion(hex("15D4"),      4)     -- 14 - GOSUB
d_SetStringRegion(hex("15D9"),      5)     -- 15 - RETURN
d_SetStringRegion(hex("15DF"),      3)     -- 16 - NEXT
d_SetStringRegion(hex("15E3"),      3)     -- 17 - STOP
d_SetStringRegion(hex("15E7"),      2)     -- 18 - END
d_SetStringRegion(hex("15EA"),      0)     -- 19 - undefined
d_SetStringRegion(hex("15EB"),      1)     -- 20 - ON
d_SetStringRegion(hex("15ED"),      3)     -- 21 - LOAD
d_SetStringRegion(hex("15F1"),      3)     -- 22 - SAVE
d_SetStringRegion(hex("15F5"),      5)     -- 23 - VERIFY
d_SetStringRegion(hex("15FB"),      3)     -- 24 - POKE
d_SetStringRegion(hex("15FF"),      2)     -- 25 - DIM
d_SetStringRegion(hex("1602"),      5)     -- 26 - DEF FN
d_SetStringRegion(hex("1608"),      4)     -- 27 - INPUT
d_SetStringRegion(hex("160D"),      6)     -- 28 - RESTORE
d_SetStringRegion(hex("1614"),      2)     -- 29 - CLS
d_SetStringRegion(hex("1617"),      4)     -- 30 - MUSIC
d_SetStringRegion(hex("161C"),      4)     -- 31 - TEMPO
d_SetStringRegion(hex("1621"),      3)     -- 32 - USRN
d_SetStringRegion(hex("1625"),      4)     -- 33 - WOPEN
d_SetStringRegion(hex("162A"),      4)     -- 34 - ROPEN
d_SetStringRegion(hex("162F"),      4)     -- 35 - CLOSE
d_SetStringRegion(hex("1634"),      2)     -- 36 - MON
d_SetStringRegion(hex("1637"),      4)     -- 37 - LIMIT
d_SetStringRegion(hex("163C"),      3)     -- 38 - CONT
d_SetStringRegion(hex("1640"),      2)     -- 39 - GET
d_SetStringRegion(hex("1643"),      3)     -- 40 - INP@
d_SetStringRegion(hex("1647"),      3)     -- 41 - OUT@
d_SetStringRegion(hex("164B"),      5)     -- 42 - CURSOR
d_SetStringRegion(hex("1651"),      2)     -- 43 - SET
d_SetStringRegion(hex("1654"),      4)     -- 44 - RESET
d_SetStringRegion(hex("1659"),      0)     -- 45 - undefined
d_SetStringRegion(hex("165A"),      0)     -- 46 - undefined
d_SetStringRegion(hex("165B"),      0)     -- 47 - undefined
d_SetStringRegion(hex("165C"),      0)     -- 48 - undefined
d_SetStringRegion(hex("165D"),      0)     -- 49 - undefined
d_SetStringRegion(hex("165E"),      0)     -- 59 - undefined
d_SetStringRegion(hex("165F"),      3)     -- 51 - AUTO
d_SetStringRegion(hex("1663"),      0)     -- 52 - undefined
d_SetStringRegion(hex("1664"),      0)     -- 53 - undefined
d_SetStringRegion(hex("1665"),      5)     -- 54 - COPY/P
d_SetStringRegion(hex("166B"),      5)     -- 55 - PAGE/P
d_SetStringRegion(hex("1671"),      0)     -- 56 - undefined
d_SetStringRegion(hex("1672"),      0)     -- 57 - undefined
d_SetStringRegion(hex("1673"),      0)     -- 58 - undefined
d_SetStringRegion(hex("1674"),      0)     -- 59 - undefined
d_SetStringRegion(hex("1675"),      0)     -- 60 - undefined
d_SetStringRegion(hex("1676"),      0)     -- 61 - undefined
d_SetStringRegion(hex("1677"),      0)     -- 62 - undefined
d_SetStringRegion(hex("1678"),      0)     -- 63 - undefined
d_SetStringRegion(hex("1679"),      0)     -- 64 - undefined
d_SetStringRegion(hex("167A"),      0)     -- 65 - undefined
d_SetStringRegion(hex("167B"),      1)     -- 66 - undefined
d_SetStringRegion(hex("167D"),      1)     -- 67 - undefined

-- Functions
d_SetStringRegion(hex("167F"),      1)     -- >=
d_SetStringRegion(hex("1681"),      1)     -- <>
d_SetStringRegion(hex("1683"),      1)     -- =<
d_SetStringRegion(hex("1685"),      1)     -- <=
d_SetStringRegion(hex("1687"),      1)     -- <=
d_SetStringRegion(hex("1689"),      1)     -- <=
d_SetStringRegion(hex("168B"),      0)     -- undefined
d_SetStringRegion(hex("168C"),      0)     -- <=
d_SetStringRegion(hex("168D"),      0)     -- <=
d_SetStringRegion(hex("168E"),      0)     -- undefined
d_SetStringRegion(hex("168F"),      0)     -- undefined
d_SetStringRegion(hex("1690"),      0)     -- undefined
d_SetStringRegion(hex("1691"),      0)     -- undefined
d_SetStringRegion(hex("1692"),      0)     -- undefined
d_SetStringRegion(hex("1693"),      0)     -- undefined
d_SetStringRegion(hex("1694"),      0)     -- undefined
d_SetStringRegion(hex("1695"),      0)     -- undefined
d_SetStringRegion(hex("1696"),      0)     -- undefined
d_SetStringRegion(hex("1697"),      0)     -- undefined
d_SetStringRegion(hex("1698"),      0)     -- undefined
d_SetStringRegion(hex("1699"),      0)     -- undefined
d_SetStringRegion(hex("169A"),      0)     -- undefined
d_SetStringRegion(hex("169B"),      0)     -- undefined
d_SetStringRegion(hex("169C"),      0)     -- undefined
d_SetStringRegion(hex("169D"),      0)     -- undefined
d_SetStringRegion(hex("168E"),      0)     -- undefined
d_SetStringRegion(hex("168F"),      0)     -- undefined
d_SetStringRegion(hex("16A0"),      1)     -- TO
d_SetStringRegion(hex("16A2"),      3)     -- STEP
d_SetStringRegion(hex("16A6"),      5)     -- LEFT$(
d_SetStringRegion(hex("16AC"),      6)     -- RIGHT$(
d_SetStringRegion(hex("16B3"),      4)     -- MID$(
d_SetStringRegion(hex("16B8"),      3)     -- LEN(
d_SetStringRegion(hex("16BC"),      4)     -- CHR$(
d_SetStringRegion(hex("16C1"),      4)     -- STR$(
d_SetStringRegion(hex("16C6"),      3)     -- ASC(
d_SetStringRegion(hex("16CA"),      3)     -- VAL(
d_SetStringRegion(hex("16CE"),      4)     -- PEEK(
d_SetStringRegion(hex("16D3"),      3)     -- TAB(
d_SetStringRegion(hex("16D7"),      6)     -- SPACE$(
d_SetStringRegion(hex("16DE"),      3)     -- SIZE
d_SetStringRegion(hex("16E2"),      2)     -- undefined
d_SetStringRegion(hex("16E5"),      6)     -- STRING$(
d_SetStringRegion(hex("16ED"),      0)     -- undefined
d_SetStringRegion(hex("16EE"),     10)     -- CHARACTER$(
d_SetStringRegion(hex("16F9"),      2)     -- CSR
d_SetStringRegion(hex("16FC"),     12)     -- undefined
d_SetStringRegion(hex("1709"),      3)     -- RND(
d_SetStringRegion(hex("170D"),      3)     -- SIN(
d_SetStringRegion(hex("1711"),      3)     -- COS(
d_SetStringRegion(hex("1715"),      3)     -- TAN(
d_SetStringRegion(hex("1719"),      3)     -- ATN(
d_SetStringRegion(hex("171D"),      3)     -- EXP(
d_SetStringRegion(hex("1721"),      3)     -- INT(
d_SetStringRegion(hex("1725"),      3)     -- LOG(
d_SetStringRegion(hex("1729"),      2)     -- LN(
d_SetStringRegion(hex("172C"),      3)     -- ABS(
d_SetStringRegion(hex("1730"),      3)     -- SGN(
d_SetStringRegion(hex("1734"),      3)     -- SQR(
d_SetStringRegion(hex("1738"),      2)     -- End of Table


d_SetDataRegion(  hex("13AB"),     77)     -- 0x13AB
d_SetStringRegion(hex("4223"),     15)     -- 0x4223 BASIC SA-5510
d_SetDataRegion(  hex("1D15"),      2)     -- 0x1D15 Data
d_SetDataRegion(  hex("1C4C"),      1)
d_SetDataRegion(  hex("1C63"),      1)     -- 0x1C63 Data
d_SetWordRegion(  hex("1BB2"),    128)     -- 0x1BB2 Data
d_SetDataRegion(  hex("3400"),      3)     -- 0x3400 Data
d_SetDataRegion(  hex("3404"),      1)     -- 0x3404 Data
d_SetDataRegion(  hex("2355"),      1)     -- 0x2355 Data
d_SetDataRegion(  hex("239F"),      1)     -- 0x239f Data
d_SetWordRegion(  hex("2691"),     34)
d_SetWordRegion(  hex("26B3"),     40)
d_SetWordRegion(  hex("26DB"),     24) 
d_SetDataRegion(  hex("26F3"),      6) 
d_SetDataRegion(  hex("27B2"),      2)     -- 0x27B2 Data
d_SetDataRegion(  hex("2884"),      1)     -- 0x2885 Data
d_SetDataRegion(  hex("2A83"),     25)     -- 0x2A83 Data
--d_SetDataRegion(  hex("2B3D"),      2)     -- 0x2B3D Data
--d_SetDataRegion(  hex("2D1D"),      2)     -- 0x2D1D Data

-- Function table.
d_SetWordRegion(  hex("22E1"),     18)

-- Function calls, CALL <Operation Byte> <Function>
d_SetDataRegion(  hex("204A"),      2)
d_SetDataRegion(  hex("12CE"),      1)
d_SetWordRegion(  hex("12CF"),      2)
d_SetDataRegion(  hex("1A78"),      1)
d_SetWordRegion(  hex("1A79"),      2)
d_SetDataRegion(  hex("1C54"),      1)
d_SetWordRegion(  hex("1C55"),      2)
d_SetDataRegion(  hex("1E23"),      1)
d_SetWordRegion(  hex("1E24"),      2)
d_SetDataRegion(  hex("20EB"),      1)
d_SetWordRegion(  hex("20EC"),      2)
d_SetDataRegion(  hex("21B3"),      1)
d_SetWordRegion(  hex("21B4"),      2)
d_SetDataRegion(  hex("287F"),      1)
d_SetWordRegion(  hex("2880"),      2)
d_SetDataRegion(  hex("2949"),      1)
d_SetWordRegion(  hex("294A"),      2)
d_SetDataRegion(  hex("29A2"),      1)
d_SetWordRegion(  hex("29A3"),      2)
d_SetDataRegion(  hex("2A3A"),      1)
d_SetWordRegion(  hex("2A3B"),      2)
d_SetDataRegion(  hex("2A4E"),      1)
d_SetWordRegion(  hex("2A4F"),      2)
d_SetDataRegion(  hex("2B10"),      1)
d_SetWordRegion(  hex("2B11"),      2)
d_SetDataRegion(  hex("2B32"),      1)
d_SetWordRegion(  hex("2B33"),      2)
d_SetDataRegion(  hex("2B6C"),      1)
d_SetWordRegion(  hex("2B6D"),      2)
d_SetDataRegion(  hex("2C05"),      1)
d_SetWordRegion(  hex("2C06"),      2)
d_SetDataRegion(  hex("2CFF"),      1)
d_SetWordRegion(  hex("2D00"),      2)
d_SetDataRegion(  hex("2D56"),      1)
d_SetWordRegion(  hex("2D57"),      2)
d_SetDataRegion(  hex("2D5C"),      1)
d_SetWordRegion(  hex("2D5D"),      2)
d_SetDataRegion(  hex("2CB2"),      1)
d_SetWordRegion(  hex("2CB3"),      2)
d_SetDataRegion(  hex("2D78"),      1)
d_SetWordRegion(  hex("2D79"),      2)
d_SetDataRegion(  hex("2D88"),      1)
d_SetWordRegion(  hex("2D89"),      2)
d_SetDataRegion(  hex("2D95"),      1)
d_SetWordRegion(  hex("2D96"),      2)
d_SetDataRegion(  hex("2DA2"),      1)
d_SetWordRegion(  hex("2DA3"),      2)
d_SetDataRegion(  hex("2DB0"),      1)
d_SetWordRegion(  hex("2DB1"),      2)
d_SetDataRegion(  hex("2E97"),      1)
d_SetWordRegion(  hex("2E98"),      2)
d_SetDataRegion(  hex("2FE7"),      1)
d_SetWordRegion(  hex("2FE8"),      2)
d_SetDataRegion(  hex("3323"),      1)
d_SetWordRegion(  hex("3324"),      2)

d_SetDataRegion(  hex("2D74"),      1)

d_SetDataRegion(  hex("2E33"),     32)
d_SetDataRegion(  hex("2EB0"),      3)
d_SetDataRegion(  hex("2F8C"),      2)
d_SetDataRegion(  hex("2FE8"),      2)
d_SetDataRegion(  hex("37AE"),    269)
d_SetDataRegion(  hex("3CE7"),     30)
d_SetDataRegion(  hex("3F05"),     48)
d_SetDataRegion(  hex("4041"),     35)
d_SetDataRegion(  hex("406F"),      7)
d_SetDataRegion(  hex("4121"),     56)


d_SetDataRegion(  hex("18BE"),      3)
d_SetDataRegion(  hex("18D7"),      3)
d_SetDataRegion(  hex("1CAA"),      2)
d_SetWordRegion(  hex("1D90"),      2)
d_SetDataRegion(  hex("2104"),      3)
--d_SetDataRegion(  hex("2221"),      3)
d_SetDataRegion(  hex("2317"),      1)
d_SetDataRegion(  hex("270F"),      3)
d_SetWordRegion(  hex("2929"),      2)
d_SetDataRegion(  hex("2A14"),      2)
d_SetDataRegion(  hex("2A2A"),      2)
d_SetDataRegion(  hex("2C8B"),      3)
d_SetWordRegion(  hex("2CDE"),      2)
d_SetDataRegion(  hex("2D10"),      2)
d_SetWordRegion(  hex("2D90"),      2)
d_SetDataRegion(  hex("30F4"),      3)
d_SetDataRegion(  hex("3BE9"),     25)
d_SetDataRegion(  hex("4118"),      3)

d_SetDataRegion(  hex("3DED"),      5)
d_SetDataRegion(  hex("3DF2"),      5)
d_SetDataRegion(  hex("3DF7"),      5)
d_SetDataRegion(  hex("3DFC"),      5)

d_SetDataRegion(  hex("1B42"),      1)
d_SetDataRegion(  hex("1C5A"),      1)
d_SetDataRegion(  hex("1D02"),      1)
d_SetDataRegion(  hex("1D89"),      1)
d_SetDataRegion(  hex("1F31"),      1)
d_SetDataRegion(  hex("204F"),      1)
d_SetDataRegion(  hex("208F"),      1)
d_SetDataRegion(  hex("2116"),      1)
d_SetDataRegion(  hex("220F"),      1)
d_SetDataRegion(  hex("221B"),      1)
d_SetDataRegion(  hex("221F"),      1)
d_SetDataRegion(  hex("245F"),      1)
d_SetDataRegion(  hex("24FD"),      1)
d_SetDataRegion(  hex("2715"),      1)
d_SetDataRegion(  hex("284E"),      1)
d_SetDataRegion(  hex("2855"),      1)
d_SetDataRegion(  hex("288F"),      1)
d_SetDataRegion(  hex("28C6"),      1)
d_SetDataRegion(  hex("2AB3"),      1)
d_SetDataRegion(  hex("2B75"),      1)
d_SetDataRegion(  hex("2C21"),      1)
d_SetDataRegion(  hex("2CEF"),      1)
d_SetDataRegion(  hex("2D7E"),      1)
d_SetDataRegion(  hex("2D8E"),      1)
d_SetDataRegion(  hex("2D9B"),      1)
d_SetDataRegion(  hex("2DA8"),      1)
d_SetDataRegion(  hex("2DB6"),      1)


-- Create a mapping table of known Sharp I/O ports and 8 bit constants.
--
-- Format           Addr      IsAddr   Label            : IsAddr = 0, value is a constant, = 1, value is an address.
d_SetByteEquate(hex("FE")   ,   1,     "PRTC"       )
d_SetByteEquate(hex("FF")   ,   1,     "PRTD"       )

-- Create a mapping table of known Sharp MZ BIOS/Memory Mapped Hardware addresses which dz80 
-- can use to replace an address with the label. The EQU list will also be output at the start
-- of the disassembly file so it can compile.
-- Format           Addr      IsAddr   Label            : IsAddr = 0, value is a constant, = 1, value is an address.
d_SetWordEquate(hex("0003"),    1,     "GETL"       )
d_SetWordEquate(hex("0006"),    1,     "LETNL"      )
d_SetWordEquate(hex("0009"),    1,     "NL"         )
d_SetWordEquate(hex("000C"),    1,     "PRNTS"      )
d_SetWordEquate(hex("000F"),    1,     "PRNTT"      )
d_SetWordEquate(hex("0012"),    1,     "PRNT"       )
d_SetWordEquate(hex("0015"),    1,     "MSG"        )
d_SetWordEquate(hex("0018"),    1,     "MSGX"       )
d_SetWordEquate(hex("001B"),    1,     "GETKY"      )
d_SetWordEquate(hex("001E"),    1,     "BRKEY"      )
d_SetWordEquate(hex("0021"),    1,     "?WRI"       )
d_SetWordEquate(hex("0024"),    1,     "?WRD"       )
d_SetWordEquate(hex("0027"),    1,     "?RDI"       )
d_SetWordEquate(hex("002A"),    1,     "?RDD"       )
d_SetWordEquate(hex("002D"),    1,     "?VRFY"      )
d_SetWordEquate(hex("0030"),    1,     "MELDY"      )
d_SetWordEquate(hex("0033"),    1,     "?TMST"      )
d_SetWordEquate(hex("003B"),    1,     "TIMRD"      )
d_SetWordEquate(hex("003E"),    1,     "BELL"       )
d_SetWordEquate(hex("0041"),    1,     "XTEMP"      )
d_SetWordEquate(hex("0044"),    1,     "MSTA"       )
d_SetWordEquate(hex("0047"),    1,     "MSTP"       )
d_SetWordEquate(hex("0000"),    1,     "MONIT"      )
d_SetWordEquate(hex("0089"),    1,     "SS"         )
d_SetWordEquate(hex("0095"),    1,     "ST1"        )
d_SetWordEquate(hex("0410"),    1,     "HLHEX"      )
d_SetWordEquate(hex("041F"),    1,     "_2HEX"      )
d_SetWordEquate(hex("074D"),    1,     "?MODE"      )
d_SetWordEquate(hex("08CA"),    1,     "?KEY"       )
d_SetWordEquate(hex("096C"),    1,     "PRNT3"      )
d_SetWordEquate(hex("0BB9"),    1,     "?ADCN"      )
d_SetWordEquate(hex("0BCE"),    1,     "?DACN"      )
d_SetWordEquate(hex("0DB5"),    1,     "?DSP"       )
d_SetWordEquate(hex("0DA6"),    1,     "?BLNK"      )
d_SetWordEquate(hex("0DDC"),    1,     "?DPCT"      )
d_SetWordEquate(hex("03BA"),    1,     "PRTHL"      )
d_SetWordEquate(hex("03C3"),    1,     "PRTHX"      )
d_SetWordEquate(hex("03DA"),    1,     "ASC"        )
d_SetWordEquate(hex("03F9"),    1,     "HEX"        )
d_SetWordEquate(hex("0DDC"),    1,     "DPCT"       )
d_SetWordEquate(hex("0DA7"),    1,     "DLY12"      )
d_SetWordEquate(hex("0DAA"),    1,     "DLY12A"     )
d_SetWordEquate(hex("0EE6"),    1,     "?RSTR1"     )
d_SetWordEquate(hex("06A3"),    1,     "MOTOR"      )
d_SetWordEquate(hex("071A"),    1,     "CKSUM"      )
d_SetWordEquate(hex("077A"),    1,     "GAP"        )
d_SetWordEquate(hex("0485"),    1,     "WTAPE"      )
d_SetWordEquate(hex("0700"),    1,     "MSTOP"      )
d_SetWordEquate(hex("11FD"),    1,     "TAPECOPY"   )
d_SetWordEquate(hex("1200"),    1,     "COLDSTRT"   )
d_SetWordEquate(hex("1250"),    1,     "WARMSTRTMON")
d_SetWordEquate(hex("15A8"),    1,     "CMDWORDTBL" )
d_SetWordEquate(hex("1BB2"),    1,     "CMDJMPTBL"  )
d_SetWordEquate(hex("2E33"),    1,     "CMTBUF"     )
d_SetWordEquate(hex("2E34"),    1,     "CMTFNAME"   )

d_SetWordEquate(hex("1C3C"),    1,     "CMDREMDATA" )
d_SetWordEquate(hex("13AB"),    1,     "SYNTAXERR"  )
d_SetWordEquate(hex("2D12"),    1,     "CMDREAD"    )
d_SetWordEquate(hex("1C4D"),    1,     "CMDLIST"    )
d_SetWordEquate(hex("1E91"),    1,     "CMDRUN"     )
d_SetWordEquate(hex("1C42"),    1,     "CMDNEW"     )
d_SetWordEquate(hex("2B0D"),    1,     "CMDPRINT"   )
d_SetWordEquate(hex("1D6A"),    1,     "CMDLET"     )
d_SetWordEquate(hex("1F2B"),    1,     "CMDFOR"     )
d_SetWordEquate(hex("21AD"),    1,     "CMDIF"      )
d_SetWordEquate(hex("13AB"),    1,     "CMDTHEN"    )
d_SetWordEquate(hex("1EA6"),    1,     "CMDGOTO"    )
d_SetWordEquate(hex("1EC7"),    1,     "CMDGOSUB"   )
d_SetWordEquate(hex("1EF8"),    1,     "CMDRETURN"  )
d_SetWordEquate(hex("1FC0"),    1,     "CMDNEXT"    )
d_SetWordEquate(hex("1D2C"),    1,     "CMDSTOP"    )
d_SetWordEquate(hex("1D15"),    1,     "CMDEND"     )
d_SetWordEquate(hex("203E"),    1,     "CMDON"      )
d_SetWordEquate(hex("2D75"),    1,     "CMDLOAD"    )
d_SetWordEquate(hex("2D82"),    1,     "CMDSAVE"    )
d_SetWordEquate(hex("2EB3"),    1,     "CMDVERIFY"  )
d_SetWordEquate(hex("2191"),    1,     "CMDPOKE"    )
d_SetWordEquate(hex("2080"),    1,     "CMDDIM"     )
d_SetWordEquate(hex("2201"),    1,     "CMDDEFFN"   )
d_SetWordEquate(hex("2BFF"),    1,     "CMDINPUT"   )
d_SetWordEquate(hex("1D4D"),    1,     "CMDRESTORE" )
d_SetWordEquate(hex("21A6"),    1,     "CMDCLS"     )
d_SetWordEquate(hex("2269"),    1,     "CMDMUSIC"   )
d_SetWordEquate(hex("2282"),    1,     "CMDTEMPO"   )
d_SetWordEquate(hex("2942"),    1,     "CMDUSRN"    )
d_SetWordEquate(hex("2D9F"),    1,     "CMDWOPEN"   )
d_SetWordEquate(hex("2D92"),    1,     "CMDROPEN"   )
d_SetWordEquate(hex("2DAD"),    1,     "CMDCLOSE"   )
d_SetWordEquate(hex("28B6"),    1,     "CMDMON"     )
d_SetWordEquate(hex("2967"),    1,     "CMDLIMIT"   )
d_SetWordEquate(hex("29CE"),    1,     "CMDCONT"    )
d_SetWordEquate(hex("2902"),    1,     "CMDGET"     )
d_SetWordEquate(hex("29FE"),    1,     "CMDINP"     )
d_SetWordEquate(hex("2A1C"),    1,     "CMDOUT"     )
d_SetWordEquate(hex("28B9"),    1,     "CMDCURSOR"  )
d_SetWordEquate(hex("2AA6"),    1,     "CMDSET"     )
d_SetWordEquate(hex("2AAA"),    1,     "CMDRESET"   )
d_SetWordEquate(hex("2A2F"),    1,     "CMDAUTO"    )
d_SetWordEquate(hex("33AB"),    1,     "CMDCOPY"    )
d_SetWordEquate(hex("32D4"),    1,     "CMDPAGE"    )

d_SetWordEquate(hex("13AE"),    1,     "OVFLERR"    )
d_SetWordEquate(hex("13B1"),    1,     "ILDATERR"   )
d_SetWordEquate(hex("13B4"),    1,     "DATMISERR"  )
d_SetWordEquate(hex("13B7"),    1,     "STRLENERR"  )
d_SetWordEquate(hex("13BA"),    1,     "MEMERR"     )
d_SetWordEquate(hex("13C0"),    1,     "LINELENERR" )
d_SetWordEquate(hex("13C3"),    1,     "GOSUBERR"   )
d_SetWordEquate(hex("13C6"),    1,     "FORNEXTERR" )
d_SetWordEquate(hex("13C9"),    1,     "FUNCERR"    )
d_SetWordEquate(hex("13CC"),    1,     "NEXTFORERR" )
d_SetWordEquate(hex("13CF"),    1,     "RETGOSBERR" )
d_SetWordEquate(hex("13D2"),    1,     "UNDEFFNERR" )
d_SetWordEquate(hex("13D5"),    1,     "LINEERR"    )
d_SetWordEquate(hex("13D8"),    1,     "CONTERR"    )
d_SetWordEquate(hex("13DB"),    1,     "BADWRERR"   )
d_SetWordEquate(hex("13DE"),    1,     "CMDSTMTERR" )
d_SetWordEquate(hex("13E1"),    1,     "READDATAERR")
d_SetWordEquate(hex("13E4"),    1,     "OPENERR"    )
d_SetWordEquate(hex("13E7"),    1,     "UNKNWNERR"  )
d_SetWordEquate(hex("13EA"),    1,     "OUTFILEERR" )
d_SetWordEquate(hex("13ED"),    1,     "PRTNRDYERR" )
d_SetWordEquate(hex("13F0"),    1,     "PRTHWERR"   )
d_SetWordEquate(hex("13F3"),    1,     "PRTPAPERERR")
d_SetWordEquate(hex("13F6"),    1,     "CHKSUMERR"  )

d_SetWordEquate(hex("1347"),    1,     "TITLEMSG"   )
d_SetWordEquate(hex("1364"),    1,     "COPYRMSG"   )
d_SetWordEquate(hex("1384"),    1,     "READYMSG"   )
d_SetWordEquate(hex("138A"),    1,     "ERRORMSG"   )
d_SetWordEquate(hex("1391"),    1,     "INMSG"      )
d_SetWordEquate(hex("1395"),    1,     "BREAKMSG"   )
d_SetWordEquate(hex("139C"),    1,     "BYTESMSG"   )
d_SetWordEquate(hex("13A3"),    1,     "ERRCODE"    )

d_SetWordEquate(hex("1332"),    1,     "MSGNL"      )
d_SetWordEquate(hex("167B"),    1,     "UNUSEDTBL1" )
d_SetWordEquate(hex("167D"),    1,     "UNUSEDTBL2" )
d_SetWordEquate(hex("124E"),    1,     "WARMSTRT"   )
d_SetWordEquate(hex("167F"),    1,     "OPERATORTBL")
d_SetWordEquate(hex("17FC"),    1,     "STRTONUM"   )
d_SetWordEquate(hex("1E88"),    1,     "GETNUM"     )
d_SetWordEquate(hex("173F"),    1,     "SKIPSPACE"  )
d_SetWordEquate(hex("173E"),    1,     "INCSKIPSPCE")
d_SetWordEquate(hex("177B"),    1,     "EXECHL"     )
d_SetWordEquate(hex("1795"),    1,     "EXECNOTCHR" )
d_SetWordEquate(hex("17A3"),    1,     "MATCHCHR"   )
d_SetWordEquate(hex("490D"),    0,     "LINEBUFR"   )
 

d_SetComment(   hex("1795"),    "Scan for character after command" )
d_SetComment(   hex("1779"),    "Get address after call and jump to it via a RET command." )
d_SetComment(   hex("2E1D"),    "Compare loaded filename against name given by user." )
d_SetComment(   hex("2B0D"),    "Check to see if a stream, ie. /T = Tape is given. The 02FH below is / and the function after is called if it doesnt match /."   )
d_SetComment(   hex("1250"),    "Sharp defined BASIC restart location from Monitor." )

-- Known Sharp Constants.
d_SetWordEquate(hex("10F0"),    0,     "ATRB"       ) -- ATTRIBUTE
d_SetWordEquate(hex("10F1"),    0,     "NAME"       ) -- FILE NAME
d_SetWordEquate(hex("1102"),    0,     "SIZE"       ) -- BYTESIZE
d_SetWordEquate(hex("1104"),    0,     "DTADR"      ) -- DATA ADDRESS
d_SetWordEquate(hex("1106"),    0,     "EXADR"      ) -- EXECUTION ADDRESS
d_SetWordEquate(hex("1108"),    0,     "COMNT"      ) -- COMMENT
d_SetWordEquate(hex("1164"),    0,     "SWPW"       ) -- SWEEP WORK
d_SetWordEquate(hex("116E"),    0,     "KDATW"      ) -- KEY WORK
d_SetWordEquate(hex("1170"),    0,     "KANAF"      ) -- KANA FLAG (01=GRAPHIC MODE)
d_SetWordEquate(hex("1171"),    0,     "DSPXY"      ) -- DISPLAY COORDINATES
d_SetWordEquate(hex("1173"),    0,     "MANG"       ) -- COLUMN MANAGEMENT
d_SetWordEquate(hex("1179"),    0,     "MANGE"      ) -- COLUMN MANAGEMENT END
d_SetWordEquate(hex("117A"),    0,     "PBIAS"      ) -- PAGE BIAS
d_SetWordEquate(hex("117B"),    0,     "ROLTOP"     ) -- ROLL TOP BIAS
d_SetWordEquate(hex("117C"),    0,     "MGPNT"      ) -- COLUMN MANAG. POINTER
d_SetWordEquate(hex("117D"),    0,     "PAGETP"     ) -- PAGE TOP
d_SetWordEquate(hex("117F"),    0,     "ROLEND"     ) -- ROLL END
d_SetWordEquate(hex("118E"),    0,     "FLASH"      ) -- FLASHING DATA
d_SetWordEquate(hex("118F"),    0,     "SFTLK"      ) -- SHIFT LOCK
d_SetWordEquate(hex("1190"),    0,     "REVFLG"     ) -- REVERSE FLAG
d_SetWordEquate(hex("1191"),    0,     "SPAGE"      ) -- PAGE CHANGE
d_SetWordEquate(hex("1192"),    0,     "FLSDT"      ) -- CURSOR DATA
d_SetWordEquate(hex("1193"),    0,     "STRGF"      ) -- STRING FLAG
d_SetWordEquate(hex("1194"),    0,     "DPRNT"      ) -- TAB COUNTER
d_SetWordEquate(hex("1195"),    0,     "TMCNT"      ) -- TAPE MARK COUNTER
d_SetWordEquate(hex("1197"),    0,     "SUMDT"      ) -- CHECK SUM DATA
d_SetWordEquate(hex("1199"),    0,     "CSMDT"      ) -- FOR COMPARE SUM DATA
d_SetWordEquate(hex("119B"),    0,     "AMPM"       ) -- AMPM DATA
d_SetWordEquate(hex("119C"),    0,     "TIMFG"      ) -- TIME FLAG
d_SetWordEquate(hex("119D"),    0,     "SWRK"       ) -- KEY SOUND FLAG
d_SetWordEquate(hex("119E"),    0,     "TEMPW"      ) -- TEMPO WORK
d_SetWordEquate(hex("119F"),    0,     "ONTYO"      ) -- ONTYO WORK
d_SetWordEquate(hex("11A0"),    0,     "OCTV"       ) -- OCTAVE WORK
d_SetWordEquate(hex("11A1"),    0,     "RATIO"      ) -- ONPU RATIO
d_SetWordEquate(hex("11A3"),    0,     "BUFER"      ) -- GET LINE BUFFER


----------------------------------------
-- End of configuration file
----------------------------------------
