Hot ZII question...

Discussion about ZX80 / ZX81 Software
User avatar
XavSnap
Posts: 2062
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.
Contact:

Re: Hot ZII question...

Post by XavSnap »

Hi,

I just scan the listing.
An OCR : https://www.onlineocr.net/

I get the codes :

Code: Select all

00 01 02 0F FF
…
I edit the text file… spaces = "," and i trim lines.

Code: Select all

00,01,02,0F,FF
…
I replace all \n (chariot return) by "\n.db "

Code: Select all

.db 00,01,02,0F,FF
…
… Or if the ML is short, i use the ASM type-ins in VB81...
asmtpyeins.JPG
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
dessony
Posts: 354
Joined: Tue Oct 29, 2013 2:26 pm
Location: Indiana, USA

Re: Hot ZII question...

Post by dessony »

Oftentimes, these hexes are crowd together in these magazines listings. However, as I understood, I will have to edit these crowd hexes into its two digits with commas.

I.e. Before editing with commas: 0123456789ABCDEF
After editing with commas: 01,23,45,67,89,AB,CD,EF

How do I do "backslash" these lisiting on the real computer, not the emulator?
"Sampler"
SHORT REM TEST.p
(1.08 KiB) Downloaded 178 times

DesSony
User avatar
mrtinb
Posts: 1979
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Hot ZII question...

Post by mrtinb »

Image
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
User avatar
XavSnap
Posts: 2062
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.
Contact:

Re: Hot ZII question...

Post by XavSnap »

:lol:
textinrem.JPG
Yes, i understand.
The BAS or TXT format is assume on the later Eighty-One release and Vb81.

You throw a text file directly in a REM line… using "Load binary"...

The another way to feel this kind of datas is to Load a text file, directly in a LET value !

Type:

Code: Select all

5 REM xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
10 DIM A$(1,1024)
15 LET A$="AABBCCDDEEFF    "
20 STOP
500 FAST
540 LET A=16514 
550 FOR X=1 TO LEN A$-1 STEP 2
560 POKE A,CODE A$(X)*16+CODE A$(X+1)-476 
570 LET A=A+1 
580 IF A$(X+2)<>" " THEN NEXT X 
590 SLOW 
You text file:
"AABBCCDDEEFF"
RUN will create a 1024 lenght buffer, after the D_File.
LOAD the binary in the vars… or fill the A$ values
Launch (@line500) the program to fill the target REM...
Last edited by XavSnap on Tue Oct 20, 2020 11:58 pm, edited 2 times in total.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
XavSnap
Posts: 2062
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.
Contact:

Re: Hot ZII question...

Post by XavSnap »

With 2 REMs:

Code: Select all

5 REM xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
6 LET T=PEEK 16426*256+PEEK 16425+3
10 REM AABBCCDDEEFFxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
20 STOP
500 FAST
540 LET A=16514
550 LET T=T+2
560 POKE A, PEEK(T)*16+PEEK(T+1)-476 
570 LET A=A+1
580 IF PEEK(T+2)<>"x" THEN GOTO 550
590 SLOW 
T=PEEK 16426*256+PEEK 16425+3 is the NXT_line pointer, + (4bytes for the line header and 1 for the REM tag)= 5bytes.

It's the better way to get text datas…
-5 REM is the asm target buffer.
-10 REM is the Zx text datas.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
XavSnap
Posts: 2062
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.
Contact:

Re: Hot ZII question...

Post by XavSnap »

The MC to convert a text in a REM:

Code: Select all

# REM AABBCCDDEE
    10  REM [HEX:\
26,26,27,27,28,28,29,29,\
2A,2A ]

    20 RAND USR (PEEK 16426*256+PEEK 16425+5)
    30  REM [HEX:\
21,82,40,11,82,40,01,00,\
00,7E,FE,76,C8,D6,1C,CB,\
07,CB,07,CB,07,CB,07,4F,\
23,7E,D6,1C,81,EB,77,EB,\
13,23,18,E2,40 ]
The MC is placed in the same REM…

Code: Select all

;------- TASM ASM mnemonics. -------
; Compile this file using:
; Set TASMOPTS = -b
; tasm -80 ThisCode.tas MyBinary.BIN
;-----------------------------------
; Zx81 Program name: VB81 XuR 
#include ZX81.sym

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



.ORG 16514

	LD HL,16514	; FROM... Text pointer.
	LD DE,16514	; TO... ASM tagget pointer.
NTXVAL:
	LD BC,0
	LD A,(HL) ; GET VALUE.
	CP $76
	RET Z
	SUB $1C
	RLC A
	RLC A
	RLC A
	RLC A
	LD C,A
	INC HL
	LD A,(HL) ; GET VALUE.
	SUB $1C
	ADD A,C
	EX DE,HL
	LD (HL),A ; Put MC @DE pointer
	EX DE,HL
	INC DE
	INC HL
	JR NTXVAL

.end
Text2HEX.zip
(46.55 KiB) Downloaded 177 times
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
mrtinb
Posts: 1979
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Hot ZII question...

Post by mrtinb »

mrtinb wrote: Tue Oct 20, 2020 10:07 pm Image
With the animated GIF above, I just wanted to show you how I load hex values on real hardware.

Note the animated GIF is several minutes long.

Good luck.

(And thank you for 16k Hot Z 2 - again). :)
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
User avatar
XavSnap
Posts: 2062
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.
Contact:

Re: Hot ZII question...

Post by XavSnap »

Thanks Martin !
Nice tutorial.

Image

Screen2Gif

:ugeek:
.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Post Reply