Started learning Machine code: Am i doing this correctly?
Started learning Machine code: Am i doing this correctly?
For zx81/TS1000 with 2k expansion
This is the code:
5 clear
10 let a=usr 3000
15 rem A9 C2 B1 00 4E c9
run (just a precaution)
rand usr 3000
and this is the error
C/10
any ideas? I'm using the Eightyone Emulator
This is the code:
5 clear
10 let a=usr 3000
15 rem A9 C2 B1 00 4E c9
run (just a precaution)
rand usr 3000
and this is the error
C/10
any ideas? I'm using the Eightyone Emulator
In Heck, there are two options for perpetual torment:
Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
Re: Started learning Machine code: Am i doing this correctly?
Hi Crayon21,
It strange ! The USR must throw the BC register in A value.
May be something wrong on a … forgotten "C9".
1) "CLEAR" erase the Vars values (all varaibles), not the memory.
On Spectrum, the "Clear" is used to set the Basic memory segment/memory… but, not on the ZX81.
2) Let A=USR 3000... Why the 3000 memory offset?
3) The rem location is unknown in the memory, you had to place it in the first Basic line. (located at 16514)
4) REM HELLO … Steel "HELLO". You had to POKE ALL values in memory.
5) … The ZX81 can't speek the hexadecimal ! REM C9 is a text oppcode.
6) RUN ? No crash?
7) RAND USR run the garbage located in 3000 (decimal)… the REPORT-B subroutine, in the ROM Basic monitor.
8) The C/10 will be displayed using RUN !
1 REM xxxxxxxxxxxxxxxxx
2 POKE 16514,169
3 POKE 16515,194
4 POKE 16516,177
5 POKE 16517,0
6 POKE 16518,78
7 POKE 16516,201
20 LET A=USR 16514
It's the very beginning of course.
It strange ! The USR must throw the BC register in A value.
May be something wrong on a … forgotten "C9".
1) "CLEAR" erase the Vars values (all varaibles), not the memory.
On Spectrum, the "Clear" is used to set the Basic memory segment/memory… but, not on the ZX81.
2) Let A=USR 3000... Why the 3000 memory offset?
3) The rem location is unknown in the memory, you had to place it in the first Basic line. (located at 16514)
4) REM HELLO … Steel "HELLO". You had to POKE ALL values in memory.
5) … The ZX81 can't speek the hexadecimal ! REM C9 is a text oppcode.
6) RUN ? No crash?
7) RAND USR run the garbage located in 3000 (decimal)… the REPORT-B subroutine, in the ROM Basic monitor.
8) The C/10 will be displayed using RUN !
1 REM xxxxxxxxxxxxxxxxx
2 POKE 16514,169
3 POKE 16515,194
4 POKE 16516,177
5 POKE 16517,0
6 POKE 16518,78
7 POKE 16516,201
20 LET A=USR 16514
Code: Select all
16514 A9 XOR A,C
16515 C2;B1;00 JP NZ,$00B1 ; []*BIOS ROM*
16518 4E LD C,(HL)
16519 C9 RET
It's the very beginning of course.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Re: Started learning Machine code: Am i doing this correctly?
i honestly can't tell if that's sarcasm or genuine annoyance?
Never been good with MC, so kindly explain the process
Never been good with MC, so kindly explain the process
Last edited by Crayon21 on Tue Nov 05, 2019 6:33 am, edited 1 time in total.
In Heck, there are two options for perpetual torment:
Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
Re: Started learning Machine code: Am i doing this correctly?
I don’t see any sarcasm.
I would recommend the book Machine Code for beginners, that learns both Z80 and 6502 machine code for any 8-bit micro. Or Mastering Machine Code on Your ZX81 that specifically targets the ZX81.
I would recommend the book Machine Code for beginners, that learns both Z80 and 6502 machine code for any 8-bit micro. Or Mastering Machine Code on Your ZX81 that specifically targets the ZX81.
Re: Started learning Machine code: Am i doing this correctly?
I will take a look at Machine code for beginners, seeing as Mastering Machine code is of questionable quality. Besides, could not get draughts to workmrtinb wrote: ↑Tue Nov 05, 2019 6:32 am I don’t see any sarcasm.
I would recommend the book Machine Code for beginners, that learns both Z80 and 6502 machine code for any 8-bit micro. Or Mastering Machine Code on Your ZX81 that specifically targets the ZX81.
In Heck, there are two options for perpetual torment:
Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
-
- Posts: 2173
- Joined: Sat Nov 26, 2016 2:42 am
Re: Started learning Machine code: Am i doing this correctly?
Mastering Machine Code is a great book. Admittedly I never typed in any of the listings so there could be syntax errors in there (or its possible you mistyped something) but what it teaches is good and covers the idiosyncrasies of the ZX81 nicely.
ZX80
ZX81 iss 1 (bugged ROM, kludge fix, normal, rebuilt)
TS 1000 iss 3, ZXPand AY and +, ZX8-CCB, ZX-KDLX & ChromaSCART
Tatung 81 + Wespi
TS 1500 & 2000
Spectrum 16k (iss 1 s/n 862)
Spectrum 48ks plus a DIVMMC future and SPECTRA
ZX81 iss 1 (bugged ROM, kludge fix, normal, rebuilt)
TS 1000 iss 3, ZXPand AY and +, ZX8-CCB, ZX-KDLX & ChromaSCART
Tatung 81 + Wespi
TS 1500 & 2000
Spectrum 16k (iss 1 s/n 862)
Spectrum 48ks plus a DIVMMC future and SPECTRA
Re: Started learning Machine code: Am i doing this correctly?
The online version I linked to, should have all the typos corrected.
Re: Started learning Machine code: Am i doing this correctly?
It should be noted crayon21 that not all members are native English speakers/writers so sometimes the posting style can seem strange but rest assured XavSnap is amongst the most helpful and knowledgeable on the forum as is Martin who supplied the two very good links.
Mastering machine code on your ZX80/81 is riddled with errors and as stands the draughts program doesn't work also the ROM maths routines are incorrect in places.
The link Martin has provided is for a corrected version of the book which I had the privilege of providing the correct ROM addresses for the maths routines, I suggest you look there for simple examples of coding but would really recommend the other link Machine code for beginners again kindly supplied by Martin.
Mastering machine code on your ZX80/81 is riddled with errors and as stands the draughts program doesn't work also the ROM maths routines are incorrect in places.
The link Martin has provided is for a corrected version of the book which I had the privilege of providing the correct ROM addresses for the maths routines, I suggest you look there for simple examples of coding but would really recommend the other link Machine code for beginners again kindly supplied by Martin.
Re: Started learning Machine code: Am i doing this correctly?
It should be noted that many of the beginner computer books from Usborne Publishing from the 80'ies can be downloaded freely from their page: https://usborne.com/browse-books/featur ... ing-books/
Half down the page under the subtitle 'Usborne 1980s computer books' you can download PDFs of the old books they have released for the public.
Half down the page under the subtitle 'Usborne 1980s computer books' you can download PDFs of the old books they have released for the public.
Re: Started learning Machine code: Am i doing this correctly?
I found a link to a pdf of a book that contains Z80 routines and a description on how to use assembly language that may be helpful. http://www.bitsavers.org/pdf/osborne/bo ... s_1983.pdf
2X Timex Sinclair 1000, ZX81, ZX80Core, 5X 16K Ram Pack, ZXBlast, ZX P file to Ear Input Signal Converter, Elf II