Started learning Machine code: Am i doing this correctly?

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: Started learning Machine code: Am i doing this correctly?

Post by Moggy »

Some excellent links there. Many thanks Martin and Blittled. :D
Crayon21
Posts: 347
Joined: Sun Nov 04, 2018 2:33 am

Re: Started learning Machine code: Am i doing this correctly?

Post by Crayon21 »

this is driving me nuts. here is the excerpt:

Using the program "HEXLD", enter the following program, by inputting the symbols in the left hand column. Once the whole program has been entered, break out by inputting "S".

2600 LD H,00h
2E2A LD L,2Ah
C9 RET

here's the issue, i type the numeric code but the zx81 goes blank for an eternity requiring a reset.
Do i press enter each time or do i have to enter the numbers one after the other?
please help, this is making me very,very irritated.

Any ideas?

Edit: figured it out, why can't they just swap input with press enter?
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
:twisted:
Shaun_B
Posts: 474
Joined: Wed Apr 22, 2009 10:22 am

Re: Started learning Machine code: Am i doing this correctly?

Post by Shaun_B »

"Started learning Machine code: Am i doing this correctly?"

What would John McCarthy say...?
John McCarthy
John McCarthy
:lol:

In all seriousness I'll read through this thread and pick up some tips!

Good luck!
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Started learning Machine code: Am i doing this correctly?

Post by XavSnap »

Thanks Shaun for this advice!

Crayon21, thanks for this… ASM tutoral.

http://www.users.waitrose.com/~thunor/m ... ter02.html
HexLD.JPG
A RAND USR 30000 give me a 0/0 prompt… (without RAMTOP to clear it by a 'NEW' command)
30000=$7530
Cool !
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Started learning Machine code: Am i doing this correctly?

Post by XavSnap »

:oops:
"26" n/l
"00" n/l
"2E" n/l
"2A" n/l
"C9" n/l
"S" n/l
RAND USR 30000

Not:
"2600" n/l
"2E2A" n/l
"C9" n/l
"S" n/l
RAND USR 30000
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Started learning Machine code: Am i doing this correctly?

Post by mrtinb »

XavSnap wrote: Thu Jan 09, 2020 2:13 am :oops:
"26" n/l
"00" n/l
"2E" n/l
"2A" n/l
"C9" n/l
"S" n/l
RAND USR 30000

Not:
"2600" n/l
"2E2A" n/l
"C9" n/l
"S" n/l
RAND USR 30000
I would assume they would give the same results.

If you use

Code: Select all

LD B,01
LD C,02
RET
You can get the output to Basic with

Code: Select all

 PRINT USR 30000
PRINT USR 30000 would in this case output

Code: Select all

258
The content of BC is automatically returned to Basic.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
Post Reply