SET n,r - Newbie question
Posted: Fri Mar 04, 2022 5:30 pm
Hello everyone! Nice to be here
Im struggling to decipher a small assembly code that creates some graphics on the Amstrad, for a few days now. My knowledge of assembly is pretty limited still but im getting the hang of it. The code that i can't really understand is:
SET 6, H
SET 7, H
I've read the definition of SET, and how this is setting the # bit on a register H, etc - but i don't fully understand how (and why) setting those bits triggers the display to output pixels on the screen - Is it maybe an alternative way to point to the Video ram? I've seen tens of examples but none used this couple of commands.
Any dummuy-proof
explanation of the following code will be very appreciated
Thank you!
Here's the whole thing:
PS. the screenshot is a result of a bit more complex version, using a XOR but still pretty similar.

Im struggling to decipher a small assembly code that creates some graphics on the Amstrad, for a few days now. My knowledge of assembly is pretty limited still but im getting the hang of it. The code that i can't really understand is:
SET 6, H
SET 7, H
I've read the definition of SET, and how this is setting the # bit on a register H, etc - but i don't fully understand how (and why) setting those bits triggers the display to output pixels on the screen - Is it maybe an alternative way to point to the Video ram? I've seen tens of examples but none used this couple of commands.
Any dummuy-proof

Thank you!
Here's the whole thing:
Code: Select all
Org &4000
.loop
Set 6, h
Set 7, h
Ld (hl), e
Adc hl, de
Inc de
jr loop