Mano Basic Computer Aritmatic, Logic, Circular Shift Codes

Aritmatic Shift

Aritmatic Shift Right

LDA NUMBER
LOP , CLE
SPA
CME
CIR
ISZ TIMES
BUN LOP
STA NUMBER
HLT
NUMBER, DEC 8
TIMES, DEC -2

Aritmatic Shift Left

LDA NUMBER
LOP , CLE
CIL
ISZ TIMES
BUN LOP
STA NUMBER
HLT
NUMBER, DEC 4
TIMES, DEC -2

Logic Shift

Logic Shift Right

LDA NUMBER
LOP , CLE
CIR
ISZ TIMES
BUN LOP
STA NUMBER
HLT
NUMBER, DEC 4
TIMES, DEC -2

Logic Shift Left

LDA NUMBER
LOP , CLE
CIL
ISZ TIMES
BUN LOP
STA NUMBER
HLT
NUMBER, DEC 4
TIMES, DEC -2

Circular Shift

Circular Shift Right

LDA NUMBER
LOP , CLE
AND MASK
SZA
CME
LDA NUMBER
CIR
STA NUMBER
ISZ TIMES
BUN LOP
HLT
NUMBER, DEC 8
TIMES, DEC -4
MASK, HEX 0001

Circular Shift Left

LDA NUMBER
LOP , CLE
SPA
CME
CIL
STA NUMBER
ISZ TIMES
BUN LOP
LDA NUMBER
HLT
NUMBER, HEX FFFF
TIMES, DEC -4

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *