Page 1 of 1

Who have an ASM code to collapse a Dfile !

Posted: Thu Jul 31, 2008 8:40 pm
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.

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

Posted: Fri Aug 01, 2008 5:39 am
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

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

Posted: Fri Aug 01, 2008 10:00 pm
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. ;)

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

Posted: Sat Aug 02, 2008 12:11 am
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 459 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

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

Posted: Sat Aug 02, 2008 7:12 pm
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 !

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

Posted: Sat Aug 02, 2008 7:42 pm
by XavSnap
WonderCoool !

Mega thanks ... :D

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

Posted: Sun Aug 03, 2008 12:53 pm
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

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

Posted: Sun Aug 03, 2008 4:30 pm
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

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

Posted: Mon Aug 04, 2008 7:41 pm
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 !