Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; acedict.asm
- ; Z80 ASM template file to generate a TAP file - "Dict" type file
- ; 2009, January - The Jupiter Ace Archive Team -> www.jupiter-ace.co.uk
- ; Compile using TASM assembler:
- ; TASM -80 -b -l filename.asm filename.tap
- #define FILENAME .TEXT "filename " ; <-- SET FILENAME HERE
- ; |----------| Keep it exactly 10 chars long!
- #include "ace.inc"
- STARTADR: .EQU $3C51 ; Start address for dict files
- .ORG STARTADR - 30 ; Make room for the file header
- .WORD 26 ; TAP 1st chunck size
- HEADERBLK: .BYTE 00 ; File Type = dict
- FILENAME ; Filename (10 bytes)
- .WORD DATABLKEND - DATABLK ; File Lenght
- .WORD STARTADR ; Start Address
- .WORD WORDLNK ; current word link <--- SET LINK HERE
- .WORD $3C4C ; CURRENT
- .WORD $3C4C ; CONTEXT
- .WORD $3C4F ; VOCLNK
- .WORD DATABLKEND ; STKBOT
- .CHK HEADERBLK ; Header Block CheckSum
- .WORD DATABLKEND - DATABLK + 1 ; TAP 2nd chunck size
- DATABLK: ; Data Block Start
- ;**************************************************************************
- ; FORTH dictionary word header
- WORDNAME: .BYTE "WOR",'D' | INVERSE ; Word Name (last letter inverse)
- .WORD WORDEND - $ ; Word Lenght Field
- .WORD $3C49 ; Link Field
- WORDLNK: .BYTE $ - WORDNAME - 4 ; Name Lenght Field
- .WORD $ + 2 ; Code Field Address
- ; >>>>>>>>>>>>>>>>>> Insert your ASM code here <<<<<<<<<<<<<<<<<<<<
- AsmEnd ; word definition end
- WORDEND:
- ;**************************************************************************
- DATABLKEND: .CHK DATABLK ; Data Block Checksum
- ; Show code statistics when compiling
- .ECHO "Start Address: "
- .ECHO STARTADR
- .ECHO " , Lenght: "
- .ECHO (DATABLKEND - DATABLK)
- .ECHO " bytes\n"
- .END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement