vjairam@tstt.net.tt
New Member
Register A of a hypothetical CPU contains a binary value 10011001. A programmer needs to make all the bits zero. Is it possible to achieve this without using MOVE or SUBTRACT instructions? If yes , how?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
You could AND the register with a 0b00000000 mask. Since the mask is all zeroes the register would be zeroed as well.Register A of a hypothetical CPU contains a binary value 10011001. A programmer needs to make all the bits zero. Is it possible to achieve this without using MOVE or SUBTRACT instructions? If yes, how?
Since he doesn't say it has to be done in a single instuction I'll call my hypothetical instruction LSR - logical shift rightI would call my hypothetical instruction
CLR
LDA 0x00 ;
DOhthat was motorola...Sorry.
Are you sure, it looks suspiciously like 6502 (unless motorola made the 6502).
Mark