Display: Screen transition. (2)

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Post Reply
User avatar
XavSnap
Posts: 757
Joined: Sat May 10, 2008 4:23 pm

Display: Screen transition. (2)

Post by XavSnap » Fri Feb 17, 2017 2:40 am

Vb81 XuR text format:

Code: Select all

# REM CLS (RELATIVE JUMPS)
 1  REM [HEX:\
2A,0C,40,11,22,00,19,11,\
21,00,06,0B,36,80,19,10,\
FB,2A,0C,40,11,23,00,19,\
11,01,00,06,13,D5,E5,D5,\
36,00,11,E0,FF,19,C5,06,\
00,10,FE,C1,D1,1B,D5,7A,\
B3,20,ED,D1,E1,11,21,00,\
19,D1,13,10,E0,2A,0C,40,\
11,75,02,19,23,06,0B,E5,\
C5,11,E0,FF,06,13,36,00,\
19,C5,06,FF,10,FE,C1,10,\
F5,C1,E1,23,10,E9,2A,0C,\
40,11,81,02,19,11,12,00,\
06,12,D5,E5,D5,36,00,11,\
E0,FF,19,C5,06,00,10,FE,\
C1,D1,1B,D5,7A,B3,20,ED,\
D1,E1,11,01,00,19,D1,1B,\
10,E0,C9 ]
# REM
 2 REM [HEX:\
2A,0C,40,11,00,00,19,01,00,03,3E,\
76,23,BE,28,FC,3E,80,AE,77,0B,78,\
B1,20,F1,C9 ]
5 REM CLS FROM TEE-TIME
8 REM ERIC LECHAUDEL(HEBDOGICIEL)
10 FOR Z=1 TO 10
20 PRINT AT INT(RND*20)+1,INT(RND*27)+1;"HELLO"
30 NEXT Z
40 LET A=USR 16659
50 LET A=USR 16514
TASM format: (line 1:CLS)
;------- TASM ASM mnemonics. -------
; Compile this file using:
; Set TASMOPTS = -b
; tasm -80 ThisCode.tas MyBinary.BIN
;-----------------------------------
; Zx81 Program name: VB81 XuR [test5.txt] :
; REM line name: 1 REM: 139 Bytes@4082-410C

#define ORG .org ; TASM cross-assembler definitions
#define equ .equ
;-----------------------------------

;------------------------------------
;-Basic sub-routine entry. -
;+----------------------------------+
; Lb4082 ; <- USR Basic Enty.
;+----------------------------------+

;------- Rom and Ram Symbols -------
RAM_D_FILE equ $400C


ORG $4082 ; [@16514/@h4082]
Lb4082: ; <- USR Basic Enty.
LD HL,(RAM_D_FILE) ; GET D-FILE
LD DE,$0022
ADD HL,DE
LD DE,$0021
LD B,$0B
Lb408E:
LD (HL),$80
ADD HL,DE
DJNZ Lb408E ; [$408E:16526]
LD HL,(RAM_D_FILE) ; GET D-FILE
LD DE,$0023
ADD HL,DE
LD DE,$0001
LD B,$13
Lb409F:
PUSH DE
PUSH HL
PUSH DE
Lb40A2:
LD (HL),$00
LD DE,$FFE0
ADD HL,DE
PUSH BC
LD B,$00
Lb40AB:
DJNZ Lb40AB ; [$40AB:16555]
POP BC
POP DE
DEC DE
PUSH DE
LD A,D
OR E
JR NZ, Lb40A2 ; [$40A2:16546]
POP DE
POP HL
LD DE,$0021
ADD HL,DE
POP DE
INC DE
DJNZ Lb409F ; [$409F:16543]
LD HL,(RAM_D_FILE) ; GET D-FILE
LD DE,$0275
ADD HL,DE
INC HL
LD B,$0B
Lb40C9:
PUSH HL
PUSH BC
LD DE,$FFE0
LD B,$13
Lb40D0:
LD (HL),$00
ADD HL,DE
PUSH BC
LD B,$FF
Lb40D6:
DJNZ Lb40D6 ; [$40D6:16598]
POP BC
DJNZ Lb40D0 ; [$40D0:16592]
POP BC
POP HL
INC HL
DJNZ Lb40C9 ; [$40C9:16585]
LD HL,(RAM_D_FILE) ; GET D-FILE
LD DE,$0281
ADD HL,DE
LD DE,$0012
LD B,$12
Lb40EC:
PUSH DE
PUSH HL
PUSH DE
Lb40EF:
LD (HL),$00
LD DE,$FFE0
ADD HL,DE
PUSH BC
LD B,$00
Lb40F8:
DJNZ Lb40F8 ; [$40F8:16632]
POP BC
POP DE
DEC DE
PUSH DE
LD A,D
OR E
JR NZ, Lb40EF ; [$40EF:16623]
POP DE
POP HL
LD DE,$0001
ADD HL,DE
POP DE
DEC DE
DJNZ Lb40EC ; [$40EC:16620]
RET ; ==========================
.end
TASM format: (line 2:Screen invert)
;------- TASM ASM mnemonics. -------
; Compile this file using:
; Set TASMOPTS = -b
; tasm -80 ThisCode.tas MyBinary.BIN
;-----------------------------------
; Zx81 Program name: VB81 XuR [test5.txt] :
; REM line name: 2 REM: 26 Bytes@4113-412C

#define ORG .org ; TASM cross-assembler definitions
#define equ .equ
;-----------------------------------

;------------------------------------
;-Basic sub-routine entry. -
;+----------------------------------+
; Lb4113 ; <- USR Basic Enty.
;+----------------------------------+

;------- Rom and Ram Symbols -------
RAM_D_FILE equ $400C


ORG $4113 ; [@16659/@h4113]
Lb4113: ; <- USR Basic Enty.
LD HL,(RAM_D_FILE) ; GET D-FILE
LD DE,$0000
ADD HL,DE
LD BC,$0300
Lb411D:
LD A,$76
Lb411F:
INC HL
CP (HL)
JR Z, Lb411F ; [$411F:16671]
LD A,$80
XOR (HL)
LD (HL),A
DEC BC
LD A,B
OR C
JR NZ, Lb411D ; [$411D:16669]
RET ; ==========================
.end

Post Reply