Who have an ASM code to collapse a Dfile !

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Post Reply
User avatar
XavSnap
Posts: 1941
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Who have an ASM code to collapse a Dfile !

Post by XavSnap »

I want to find a ROM jump or an ASM code to comvert a 16kb programa to a 1Kb programa with the VARS segment.
Without change the Ram-top!
(without using XuR tooo...)
Thanks in advance.
Have Fun.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
wilf_zx
Posts: 18
Joined: Tue Jun 24, 2008 9:12 pm

Re: Who have an ASM code to collapse a Dfile !

Post by wilf_zx »

This is an abbreviated version of the ROM routine to clear and collapse DFILE

RES 1,(IY+01)
LD BC,1821
PUSH BC
CALL 0918
POP BC
JP 0A52
User avatar
XavSnap
Posts: 1941
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Who have an ASM code to collapse a Dfile !

Post by XavSnap »

This is an abbreviated version of the ROM routine to clear and collapse DFILE

RES 1,(IY+01)
LD BC,1821
PUSH BC
CALL 0918
POP BC
JP 0A52
Thanks Wilf,
I will try to code something to preserve the Vars. ;)
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
wilf_zx
Posts: 18
Joined: Tue Jun 24, 2008 9:12 pm

Re: Who have an ASM code to collapse a Dfile !

Post by wilf_zx »

The collapse DFILE ASM program I posted does not clear the BASIC variables.

try this example:
crunch_DFILE.tzx
(1.63 KiB) Downloaded 395 times
(btw how can I save a .p file?)

Your first post seemed to indicate that you want to collapse an expanded DFILE of a 1K BASIC program, developed in a 16K environment, so that when this 1K program, together with the collapsed DFILE and its BASIC variables is saved, it will load correctly into a 1K ZX81.

Have I got this right?

wilf
User avatar
XavSnap
Posts: 1941
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Who have an ASM code to collapse a Dfile !

Post by XavSnap »

Hi Wilf,
Your first post seemed to indicate that you want to collapse an expanded DFILE of a 1K BASIC program, developed in a 16K environment, so that when this 1K program, together with the collapsed DFILE and its BASIC variables is saved, it will load correctly into a 1K ZX81.

Have I got this right?

In Fact, ... 24kb to 16kb ... , this code will be used in my new adventure game engine (STD engine),
I don't use the Dfile, and i want to retrive "MY" (192-34) bytes to basic memory segment !!!
And i can use it to speed up the loading, without dfile saving !
Many thanks Wilf ;)

Note:
Your previous code seem corrupt !!!
I use Artic ASM2 and TASM ... but the ASM "call" don't back in this code !

Have Fun !
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
XavSnap
Posts: 1941
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Who have an ASM code to collapse a Dfile !

Post by XavSnap »

WonderCoool !

Mega thanks ... :D
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Mike
Posts: 52
Joined: Sun May 11, 2008 5:38 pm

Re: Who have an ASM code to collapse a Dfile !

Post by Mike »

Don't know if it's any use to you, but to collapse the display file from BASIC you can use SCROLL. If you SCROLL 22 times you'll have a completely collapsed display file.

Mike
wilf_zx
Posts: 18
Joined: Tue Jun 24, 2008 9:12 pm

Re: Who have an ASM code to collapse a Dfile !

Post by wilf_zx »

Hi Mike,

First adjust DF-SZ with POKE 16418,0 or else 24 SCROLLs would leave the two command lines of the LOWER screen still fully expanded.

wilf
User avatar
XavSnap
Posts: 1941
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Who have an ASM code to collapse a Dfile !

Post by XavSnap »

Ok!
It's look likee that !

Code: Select all

LD A,0
LD (+16418),A
LD BC,1600
@RETSCRL
PUSH BC
CALL 0C0E
POP BC
DJNZ RETSCRL
RET
Thanks again !
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Post Reply