# put your TASM codes, and add a "|" character to add a New line.

0 REM [ASM    :   \  
;------- TASM ASM mnemonics. -------|\
; Compile this file using:|\
; Set TASMOPTS = -b|\
; tasm -80 ThisCode.tas MyBinary.BIN|\
;-----------------------------------|\
; Zx81 Program name: VB81 XuR [Decoder.p] :|\
; REM   line   name: D=16514/16562 : H=4082/40B2|\
|\
#define ORG  .org       ; TASM cross-assembler definitions|\
#define equ  .equ|\
|\
RAM_D_FILE equ $400C|\
EXTERR .equ $005B ; Basic Break function ! Ignore line instructions.|\
SPARE16 .equ $407B|\
|\
|\
ORG $4082 ; [@16514/@h4082]|\
|\
	LD A,30|\
	LD A,$1E|\
	.bd 30|\
	.dw $1E1E|\
	RST 20H|\
	LD HL,(RAM_D_FILE) ; GET D-FILE|\
	JP Z,EXTERR|\
Lb408D:|\
	JR Lb408D ; [$408D:16525]|\
.end ]

# Create a REM with hexadecimals values
1 REM [HEX:\
0,1,2,3,1E,FF ]

# Create a REM with decimals values
2 REM [DEC: 0,1,2,3,30,255 ]

# Create a REM with binary values
3 REM [BIN: 0,1,10,11,11110,11111111 ]

# Create a REM and translate the text to 6 bits text.
# Put a up-grey character to end the text feed.("\~~" or "¿";SHIFT+S)
4 REM [TX6:\
@01HELLO@01£@01WORLD@01@0A]

# Create a REM line with 1024 bytes lenght.(DECIMAL)
5 REM [SPD: 1024]

# Create a REM line with $400 bytes lenght.(HEXADECIMAL)
6 REM [SPH: 400]

# Create a REM line with text and specials characters
10 REM HELLO WORLD@10@1A@1B@1C@1D@E9

# Create a PRINT line with  inverted characters.
20 PRINT "%H%E%L%L%O% %W%O%R%L%D @E9@E9@E9@E9@E9"
30 PRINT "@C0HELLO WORLD@C0\
hello\
@80\
world"
# Create a PRINT line with  HEXADECIMAL characters codes
40 PRINT "@09@0A@09@0A@09@0A@09@0A@09@0A@09@0A"
50 PRINT "@F5@DA@EC@D9@F7"

# SAVE TO A Basic text file.
100 SAVE "MYPRG.TXT"

# SAVE TO A WAV file.
200 SAVE "MYPRG.WAV"

# SAVE TO A FAST-LOAD WAV with boot-stap file.
300 SAVE "MYPRG.FL"

# SAVE TO A 'P' file.
400 SAVE "MYPRG"

# To display all specials Zx81 characters
# Better use the "Zx81_Riched_V3.3[XavSnap].ttf" in the "Zx81_Fonts" directory.
# Just install the fonte, and load the 'ASCII_TABLE.TXT' demo file in a note-pad.
# Select the right fonte, and copy/paste specials charcters in your basic program.
# Vb81 able to reload this specials characters.
# Have fun.

