Hello, I'm Restarting ZX81 Programming After... 30 Years
Re: Hello, I'm Restarting ZX81 Programming After... 30 Years
Thank you everyone for being so helpful. There seems to be a lot of expertise here! I think this is enough to get me started
Just one more question I'm not clear on, is it possible at all to detect the start of the second user programme execution block, that is (4) in my list, the set of lines below the screen?
Just one more question I'm not clear on, is it possible at all to detect the start of the second user programme execution block, that is (4) in my list, the set of lines below the screen?
- 1024MAK
- Posts: 5189
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
Re: Hello, I'm Restarting ZX81 Programming After... 30 Years
Welcome to the forum Ian!
Mark
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
Looking forward to summer being good this year.
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
Looking forward to summer being good this year.
Re: Hello, I'm Restarting ZX81 Programming After... 30 Years
Thank you 1024MAK, I'm glad to be here!
And also my brain is starting to frazzle with Z80 machine code...
And also my brain is starting to frazzle with Z80 machine code...
Re: Hello, I'm Restarting ZX81 Programming After... 30 Years
Yes - you may read IX register for that purpose.IanB wrote: Just one more question I'm not clear on, is it possible at all to detect the start of the second user programme execution block, that is (4) in my list, the set of lines below the screen?
If it is $0281 it is indicating top margin and if it is $028F it is indicating bottom margin.
Re: Hello, I'm Restarting ZX81 Programming After... 30 Years
Thanks, another question, is it safe to store stuff in the System Variable areas PRBUFF (the printer buffer) and MEMBOT (the calculator memory area) and under what conditions do these get cleared by the ROM? E.g. if I RET from the machine code to BASIC?
Re: Hello, I'm Restarting ZX81 Programming After... 30 Years
Take a look in the sources of the 1K hires games.
You can use the PRBUFF without problems. I suggest to start MC and NEVER return to BASIC.
Why? You can use the BASIC as part of your screen and clear it for use on screen. Also no tests needed for ROOM in Basic.
What would be the advantage of BASIC over a MC-routune?
http://sinclairzxworld.com/viewtopic.ph ... ces#p16917
You can use the PRBUFF without problems. I suggest to start MC and NEVER return to BASIC.
Why? You can use the BASIC as part of your screen and clear it for use on screen. Also no tests needed for ROOM in Basic.
What would be the advantage of BASIC over a MC-routune?
http://sinclairzxworld.com/viewtopic.ph ... ces#p16917
Re: Hello, I'm Restarting ZX81 Programming After... 30 Years
Well - I like your 1k programs, dr.beep but in fact creating those programs is more or less a personal passion.
This is not always the best way for beginners (or retired programmers ).
I like the coexsistance of BASIC and Assembler more - both can benefit from each other.
Assembler is fast and BASIC is more powerful in functionality.
And only a few enthusiasts really work with Zeddy without any additional memory. 16k is the most common.
To answer your question - you may use the printer buffer as long as you don't print and as long as no other application has the same idea.
It's not used from the normal BASIC I think (not 100% sure).
I would avoid MEMBOT as this is used from BASIC routines.
You may use the ZX-IDE as development tool when developing under WIN.
viewtopic.php?f=6&t=1064
It does also support the usage of the EightyOne Emulator which are both together a winning team in my eyes.
It is very easy to mix BASIC and Assembly commands in one file - can see the ZX81DEMO.ASM and the tutorial thread.
Changes in your program can be tested automatically with pressing F8 in the code editor which starts or restarts the EightyOne with the actually compiled program (when autoload is switched on in the emulator).
This is not always the best way for beginners (or retired programmers ).
I like the coexsistance of BASIC and Assembler more - both can benefit from each other.
Assembler is fast and BASIC is more powerful in functionality.
And only a few enthusiasts really work with Zeddy without any additional memory. 16k is the most common.
To answer your question - you may use the printer buffer as long as you don't print and as long as no other application has the same idea.
It's not used from the normal BASIC I think (not 100% sure).
I would avoid MEMBOT as this is used from BASIC routines.
You may use the ZX-IDE as development tool when developing under WIN.
viewtopic.php?f=6&t=1064
It does also support the usage of the EightyOne Emulator which are both together a winning team in my eyes.
It is very easy to mix BASIC and Assembly commands in one file - can see the ZX81DEMO.ASM and the tutorial thread.
Changes in your program can be tested automatically with pressing F8 in the code editor which starts or restarts the EightyOne with the actually compiled program (when autoload is switched on in the emulator).
Re: Hello, I'm Restarting ZX81 Programming After... 30 Years
True, but in 1K the use of MEMBOT and BASIC will likely cost more than the routine in MC.PokeMon wrote:Well - I like your 1k programs, dr.beep but in fact creating those programs is more or less a personal passion.
This is not always the best way for beginners (or retired programmers ).
I like the coexsistance of BASIC and Assembler more - both can benefit from each other.
Assembler is fast and BASIC is more powerful in functionality.
And only a few enthusiasts really work with Zeddy without any additional memory. 16k is the most common.
When coding in 16K I would say, use both for the simpliest use, but in 1K you will need all the space available.
To answer your question - you may use the printer buffer as long as you don't print and as long as no other application has the same idea.
It's not used from the normal BASIC I think (not 100% sure).
I would avoid MEMBOT as this is used from BASIC routines.
You may use the ZX-IDE as development tool when developing under WIN.
viewtopic.php?f=6&t=1064
It does also support the usage of the EightyOne Emulator which are both together a winning team in my eyes.
It is very easy to mix BASIC and Assembly commands in one file - can see the ZX81DEMO.ASM and the tutorial thread.
Changes in your program can be tested automatically with pressing F8 in the code editor which starts or restarts the EightyOne with the actually compiled program (when autoload is switched on in the emulator).
Re: Hello, I'm Restarting ZX81 Programming After... 30 Years
I am looking at using PRBUFF and MEMBOT (and the two more unused bytes) because I see there 65 lovely bytes that can store program data, "sprite" data etc, for "free" and which are loaded in by the LOAD command, that's why I'm interested in what circumstances might erase or corrupt their contents. For instance, I am not sure (despite looking through the ROM dissassembly) whether the completion of the LOAD routine will do so. I don't want to use BASIC at all, but somehow the program must be loaded in on a standard ZX81, which is performed by part of the BASIC system.
I am writing for the 1K standard machine because I am interested in the challenge of what could be achieved with it (meaning, what could have been achieved back in 1981, compared to those crummy official Sinclair software tapes haha). Also, any 1K program by definition must be short. A 16k must be a big impressive program to be worth doing, and that's a greater commitment of time and effort. I see some fabulous 16k programs here on this forum and I don't have the time to commit to competing with that standard
It is a nice challenge here in 2015 to take a machine that even at the time was considered too little memory to do anything useful, and prove otherwise There is obviously no "rational" reason for ZX81 software of any kind in this day and age. It is just something I want to do as a personal thing.
And yes, I am using ZX-IDE and EightyOne
I am writing for the 1K standard machine because I am interested in the challenge of what could be achieved with it (meaning, what could have been achieved back in 1981, compared to those crummy official Sinclair software tapes haha). Also, any 1K program by definition must be short. A 16k must be a big impressive program to be worth doing, and that's a greater commitment of time and effort. I see some fabulous 16k programs here on this forum and I don't have the time to commit to competing with that standard
It is a nice challenge here in 2015 to take a machine that even at the time was considered too little memory to do anything useful, and prove otherwise There is obviously no "rational" reason for ZX81 software of any kind in this day and age. It is just something I want to do as a personal thing.
And yes, I am using ZX-IDE and EightyOne
Re: Hello, I'm Restarting ZX81 Programming After... 30 Years
After loading you can use the first 30 addresses from #4000 in MC without problems.