How to make listing visable after pokes in line 1
Re: How to make listing visable after pokes in line 1
RS232,
Is it a wav converted to P ? (read error bits decays)
Can you send you P file on the forum ?
Is it a wav converted to P ? (read error bits decays)
Can you send you P file on the forum ?
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Re: How to make listing visable after pokes in line 1
apologies for any cross post confusion..
It is actually the fantastic zx81 draw command from Drbeep the download here (already on the forum)
https://www.sinclairzxworld.com/downloa ... p?id=14940
I am hoping to use this lovely tool in a new zx81 realise if i can get round the issue. Will have everyone credited in an
about page of course if used
Re: How to make listing visable after pokes in line 1
the main cause of this problem is due to a problem with the assembler routine, in its operation or its return to BASIC.
In this case, many POKEs damage the BASIC listing and the SAVE command catch the memory BASIC segment as is !
I use to check binarys, or extract the BASIC text listing using "ZXToken" to reconstruct a proper P file.
In the past, they advice to SAVE before a RUN, if the program call any ASM routines, to avoid to damage the BASIC program itself.
In this case, many POKEs damage the BASIC listing and the SAVE command catch the memory BASIC segment as is !
I use to check binarys, or extract the BASIC text listing using "ZXToken" to reconstruct a proper P file.
In the past, they advice to SAVE before a RUN, if the program call any ASM routines, to avoid to damage the BASIC program itself.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Re: How to make listing visable after pokes in line 1
Did this ever get resolved?
So this is dr beep's LINE-command
The original from dr beep (line3.p) has "pokes in line1" (machine code in line 0 REM). This line has effectively had the line number poked to be 0. This prevents the line from being deleted in the normal way
The following lines after 0 REM don't show up with LIST ... because 0 REM has two NEWLINES at the beginning of the REM (118/76h). These can be POKEd in and stop the LIST command at that point
But can still be viewed with LIST 1 in my experience the NEWLINES at the beginning of machine code are put there to stop LIST. Either to hide the machine code, or to make a program listing streamlined. Instead of a bunch of random keywords appearing it just shows the line number and REM, so that you don't get this:
You could also replace the NEWLINEs with zeros:
Whether the NEWLINEs are there or not has no affect on how LINE-command draws a line, it only affects how LIST shows the line
So this is dr beep's LINE-command
The original from dr beep (line3.p) has "pokes in line1" (machine code in line 0 REM). This line has effectively had the line number poked to be 0. This prevents the line from being deleted in the normal way
The following lines after 0 REM don't show up with LIST ... because 0 REM has two NEWLINES at the beginning of the REM (118/76h). These can be POKEd in and stop the LIST command at that point
But can still be viewed with LIST 1 in my experience the NEWLINES at the beginning of machine code are put there to stop LIST. Either to hide the machine code, or to make a program listing streamlined. Instead of a bunch of random keywords appearing it just shows the line number and REM, so that you don't get this:
Code: Select all
0 REM 5: TRAND SCROLL RETURN PC¢Y×MKRNDSCROLL LN CLEAR RNDFAST LN CLEAR RNDAT VAL FAST LN PLOT RNDLPRINT AT |È?CºK¢GOSUB ??Ø¥W?}É?CºK¢GOSUB ??Ø¥W_yôK²iSTR$ ë_/¹íCOS hINKEY$ STR$ - `x3¯S¦ùS¹Ì? OR SGN STR$ /¤?STR$ OR SGN ¡==x¶?yª?LN PLOT RND OR y( TO SGN TAN GOSUB ?FAST RND?î"LN ºINKEY$ gFAST LN ºINKEY$ LPRINT oTAN SCROLL LN ???¢£
1 LET U=10
10 PRINT USR 16516;P;U;U;20;20
20 PRINT USR 16516;U;U;U;20;20
The LINE-command can be used as-is, no need to fix it when using LIST. The simplest way to use LINE-command is to start with dr beep's line3.p, delete lines 1, 10 and 20 and put your own program after 0 REM
You could also replace the NEWLINEs with zeros:
Code: Select all
POKE 16514,0
POKE 16515,0
RS232 wrote: ↑Fri Jun 14, 2024 12:11 pmapologies for any cross post confusion..
It is actually the fantastic zx81 draw command from Drbeep the download here (already on the forum)
https://www.sinclairzxworld.com/downloa ... p?id=14940
I am hoping to use this lovely tool in a new zx81 realise if i can get round the issue. Will have everyone credited in an
about page of course if used
Re: How to make listing visable after pokes in line 1
As I recall the two N/L characters are required only IF there are embedded N/L characters in you MC routine . Trying to LIST such a line can crash the computer.
Regards;
Greg
Regards;
Greg
Re: How to make listing visable after pokes in line 1
i was thinking the same but have never encountered a problem, so recently i tested it ... no crash or any other problems
here is the machine code that's in the REM
Code: Select all
1 REM _asm
JR mycode
NOP ;POKE a N/L (118) here
mycode: LD BC,1
RET
END _asm
I see reports that the "old ROM" crashed in this scenario, so i tried to figure out which ROM ... and it is apparently the ZX80 original ROM, which Toni Baker called the "OLD ROM" and said in Mastering Machine Code:
OLD ROM folk are specifically advised NOT to use a REM statement, since the machine code contains newline characters
- 1024MAK
- Posts: 5343
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
Re: How to make listing visable after pokes in line 1
Yes, the term “old ROM” generally means the ZX80. The ZX81 ROM being known as the “new ROM”.
It is possible to put some machine code in a REM on the ZX80, but various values (other than normal printable character codes) may cause problems often including a crash.
The ZX81 is much more robust in this regard and I can’t think of myself having any problems (apart from the effect on the listing).
Mark
It is possible to put some machine code in a REM on the ZX80, but various values (other than normal printable character codes) may cause problems often including a crash.
The ZX81 is much more robust in this regard and I can’t think of myself having any problems (apart from the effect on the listing).
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Autumn is here. Bye bye summer 2024...
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Autumn is here. Bye bye summer 2024...
Re: How to make listing visable after pokes in line 1
Much thanksDavid G wrote: ↑Thu Oct 10, 2024 11:00 pm Did this ever get resolved?
in my experience the NEWLINES at the beginning of machine code are put there to stop LIST. Either to hide the machine code, or to make a program listing streamlined. Instead of a bunch of random keywords appearing it just shows the line number and REM, so that you don't get this:The LINE-command can be used as-is, no need to fix it when using LIST. The simplest way to use LINE-command is to start with dr beep's line3.p, delete lines 1, 10 and 20 and put your own program after 0 REMCode: Select all
0 REM 5: TRAND SCROLL RETURN PC¢Y×MKRNDSCROLL LN CLEAR RNDFAST LN CLEAR RNDAT VAL FAST LN PLOT RNDLPRINT AT |È?CºK¢GOSUB ??Ø¥W?}É?CºK¢GOSUB ??Ø¥W_yôK²iSTR$ ë_/¹íCOS hINKEY$ STR$ - `x3¯S¦ùS¹Ì? OR SGN STR$ /¤?STR$ OR SGN ¡==x¶?yª?LN PLOT RND OR y( TO SGN TAN GOSUB ?FAST RND?î"LN ºINKEY$ gFAST LN ºINKEY$ LPRINT oTAN SCROLL LN ???¢£ 1 LET U=10 10 PRINT USR 16516;P;U;U;20;20 20 PRINT USR 16516;U;U;U;20;20
You could also replace the NEWLINEs with zeros:Whether the NEWLINEs are there or not has no affect on how LINE-command draws a line, it only affects how LIST shows the lineCode: Select all
POKE 16514,0 POKE 16515,0
LIST with NEWLINE,NEWLINE removed.png