Mano Basic Computer Aritmatic, Logic, Circular Shift Codes

Posted by dogukanhan on April 15, 2019 · 1 min read

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