ZX Utility Query*SOLVED*

Discussion about ZX80 / ZX81 Software
User avatar
XavSnap
Posts: 704
Joined: Sat May 10, 2008 4:23 pm

Re: ZX Utility Query

Post by XavSnap » Mon Jul 01, 2019 4:58 pm

[edit] old release.
Last edited by XavSnap on Tue Jul 02, 2019 1:57 am, edited 2 times in total.

User avatar
XavSnap
Posts: 704
Joined: Sat May 10, 2008 4:23 pm

Re: ZX Utility Query

Post by XavSnap » Mon Jul 01, 2019 6:05 pm

Listing :
listing.jpg
Last edited by XavSnap on Thu Jul 04, 2019 11:48 pm, edited 2 times in total.

User avatar
XavSnap
Posts: 704
Joined: Sat May 10, 2008 4:23 pm

Re: ZX Utility Query

Post by XavSnap » Tue Jul 02, 2019 1:53 am

Code: Select all

;------- TASM ASM mnemonics. -------
; Compile this file using:
; Set TASMOPTS = -b
; tasm -80 ThisCode.tas MyBinary.BIN
;-----------------------------------
; Zx81 Program name: VB81 XuR [Merge.bas] :
; REM   line   name: D=32672/32767 : H=7FA0/7FFF

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

;------- Rom and Ram Symbols -------
ADD_CHAR equ $0526
RAM_RAMTOP equ $4004
RAM_D_FILE equ $400C
RAM_ERR_SP equ $4002


ORG $7FA0 ; [@32672/@h7FA0]

	LD BC,(Lb7FFE) 
	PUSH BC 
Lb7FA5:
	PUSH BC 
	LD HL,$407D 
	LD A,$1B 
	CALL ADD_CHAR ; [ADD-CHAR]
	POP BC 
	DEC BC 
	LD A,C 
	OR B 
	JR NZ, Lb7FA5 ; [$7FA5:32677]
	POP BC 
	LD HL,(RAM_RAMTOP) ; GET RAM-TOP
	LD DE,$407D 
	LDIR
	RET ; ==========================

Lb7FBE:    ; <<< Uncharted Entry ]

	LD HL,(RAM_RAMTOP) ; GET RAM-TOP
	SBC HL,SP 
	LD B,H 
	LD C,L 
	LD HL,(RAM_D_FILE) ; GET D-FILE
	LD DE,$407D 
	SBC HL,DE 
	LD (Lb7FFE),HL 
	EX DE,HL 
	LD HL,(RAM_RAMTOP) ; GET RAM-TOP
	SBC HL,DE 
	LD (RAM_RAMTOP),HL ; SET RAM-TOP
	SBC HL,BC 
	EX DE,HL 
	LD HL,$0000 
	ADD HL,SP 
	LDIR 
	EX DE,HL 
	SBC HL,DE 
	LD D,H 
	LD E,L 
	ADD HL,SP 
	LD SP,HL 
	RR HL,(RAM_E_SP) ; GET ERR-SP
	ADD HL,DE 
	RR (RAM_E_SP),HL ; SET ERR-SP
	LD BC,(Lb7FFE) 
	LD HL,$407D 
	LD DE,(RAM_RAMTOP) ; GET RAM-TOP
	LDIR
	RET ; ==========================

Lb7FFE:

.end
Last edited by XavSnap on Thu Jul 04, 2019 11:43 pm, edited 2 times in total.

User avatar
XavSnap
Posts: 704
Joined: Sat May 10, 2008 4:23 pm

Re: ZX Utility Query

Post by XavSnap » Thu Jul 04, 2019 11:41 pm

:D

A new … working version !

Code: Select all

10 REM [HEX:\
ED,4B,FE,7F,C5,C5,21,7D,40,3E,1B,CD,25,05,C1,0B,\
79,B0,20,F1,C1,2A,04,40,11,7D,40,ED,B0,C9,2A,04,\
40,ED,72,44,4D,2A,0C,40,11,7D,40,ED,52,22,FE,7F,\
EB,2A,04,40,ED,52,22,04,40,ED,42,EB,21,00,00,39,\
ED,B0,EB,ED,52,54,5D,39,F9,2A,02,40,19,22,02,40,\
ED,4B,FE,7F,21,7D,40,ED,5B,04,40,ED,B0,C9,00,00 ]
20 REM [HEX:\ 
21,82,40,11,A0,7F,01,60,00,ED,B0,C9 ]
30 RAND USR 16616
40 STOP
9998 SAVE"MERGE"
9999 RUN
MERGE.P
(1.05 KiB) Downloaded 9 times
TODO:
Move the Ram_Top :

POKE 16388,160
POKE 16389,127
NEW

LOAD "MERGE"

LOAD the Program#1.
RAND USR 32702

LOAD the Program#2
RAND USR 32672

Type LIST.
RAM_TOP.jpg
Have Fun !

(Important note regards VB81 XuR.
The LOADing process use a trapping routine located in the ROM.
On a true ZX81 the Ram_top is reset properly, but in this emulator, the loading routine "can't" properly set the Ram_TOP !
Use to set the Ram_TOP with a NEW command to set the right Ram_Top.
The Pop-up menu "reset memory>init Ram_Top to 32kb" seem working…)
Last edited by XavSnap on Fri Jul 05, 2019 5:41 am, edited 1 time in total.

User avatar
XavSnap
Posts: 704
Joined: Sat May 10, 2008 4:23 pm

Re: ZX Utility Query

Post by XavSnap » Fri Jul 05, 2019 4:28 am

Merge 32kb version (only 20kb Basic memory available):
Ram_Top @ 49999

TODO:
Move the Ram_Top :

POKE 16388,200
POKE 16389,175
NEW

LOAD "MERGE32"

LOAD the Program#1.
RAND USR 45030

LOAD the Program#2
RAND USR 45000
Type LIST.

[Tested on EO]
Merge32.TZX
(3.19 KiB) Downloaded 18 times
MERGE32.P
(1.05 KiB) Downloaded 19 times

butchi
Posts: 23
Joined: Wed Jun 12, 2019 4:12 am

Re: ZX Utility Query

Post by butchi » Sun Jul 07, 2019 1:33 am

XavSnap wrote:
Fri Jul 05, 2019 4:28 am
Merge 32kb version (only 20kb Basic memory available):
Ram_Top @ 49999

TODO:
Move the Ram_Top :

POKE 16388,200
POKE 16389,175
NEW

LOAD "MERGE32"

LOAD the Program#1.
RAND USR 45030

LOAD the Program#2
RAND USR 45000
Type LIST.

[Tested on EO]

Merge32.TZX
MERGE32.P
XavSnap,
What I've noticed, one EO version does not function like another!
On EO v1.2, your Merge_32KB version did not hiccup on a 'plane jane' 1 REM prg1, 2 REM prg2 (fully functional).
Merging attachment went smoothly until RAND USR 45000, freezing EO v1.2 :?:
b
Attachments
JOINDEMO.zip
(6.38 KiB) Downloaded 11 times

User avatar
XavSnap
Posts: 704
Joined: Sat May 10, 2008 4:23 pm

Re: ZX Utility Query

Post by XavSnap » Sun Jul 07, 2019 4:29 am

:lol:
No, the ZX wasn't frozen ... it worked !

The ASM routine just move the basic programme (2)… step by step, using MakeRoom's Rom routine.
He had to reset all D_File values locations… for each added byte from the program1.
I had to wait, a long minute to get the result.
Just power up the emulator to "speed x 32" to save time.

I try many configurations, in Slow mode, Fast mode …
But, i tried to wait a little more… and something append!

I add a 32kb auto-loader... just type LOAD""... RAND USR 45030... LOAD""... RAND USR 45000
Take a big coffee… donuts … and go back 15 mn later.
:mrgreen:
test.tzx
(16.33 KiB) Downloaded 12 times

Post Reply