REM Line length

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: REM Line length

Post by dr beep »

Vorticon wrote: Fri Mar 11, 2022 1:44 pm but doing assembly on the Zeddy hardware (not emulation) appears to be a particular form of masochism :lol:
I have NEVER coded a game in machinecode on the ZX81.
I did do it on a ZX Spectrum (TORNADO ASSEMBLER and export .P) but now I do it on a PC environment.
But enough whining. I do have a question: How many characters can be stored in a single REM statement?
This is one of the mainreasons I don't code on the ZX81. My .P is optimized in saving bytes.
Outside the ZX81 makes using more memory to be used. My BASIC is placed over sysvar and no REM needed since
the program will never do a syntaxcheck, it will only execute.
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: REM Line length

Post by XavSnap »

you can ‘merge’ two consecutive BASIC
Type the first REM (10 characters)
Cap0166.jpg
Cap0166.jpg (3.53 KiB) Viewed 1269 times
Type Shift+1 to edit the line, and change the line number, then new/line.
Cap0167.jpg
Cap0167.jpg (5.65 KiB) Viewed 1269 times
Cap0168.jpg
Cap0168.jpg (11.17 KiB) Viewed 1269 times
remline.JPG
Change the first line length by the new one : 5*12 [1 tocken REM+10*character+new/line]+4*4 [added lines Headers]
Cap0170.jpg
If the REM exceed 255 characters, you had to poke the 16512 offset...
This REM will be full off the Basic REM datas, ghosted in the new line.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
Vorticon
Posts: 69
Joined: Tue Mar 01, 2022 1:14 pm

Re: REM Line length

Post by Vorticon »

Thanks for the tip. The Baker book does actually detail a procedure to merge REM statements as well, although it's a rather clumsy procedure.
I've been taking a look at the ZX Assembler 2 and I think this package will be a huge step up from hand assembling code and worrying about REM statements manipulation.
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: REM Line length

Post by mrtinb »

I use Memotech's Z80 Assembler loaded at location 8k-16k. I find it pleasant that the source is stored in a Basic string array, and can be manipulated outside the assembler if needed.

viewtopic.php?f=11&t=3190
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
sboisvert
Posts: 40
Joined: Mon Nov 02, 2009 3:43 pm

Re: REM Line length

Post by sboisvert »

I remember in one of the Sinclair magazines the listing for a game all done in MC - the article had the user create a single large REM statement by hand, then duplicate it several times (edit, change line number, hit ENTER); afterwards, it had the user issue a CLS, then a few POKEs that would end up "merging" all the REM statements into a single one.

Somewhat convoluted, but it worked!
Post Reply