justin french
asked on
Assembly code little man machine
i want to have 2 options in the Little man Machine? 1. user wants add 2 numbers and then in option 2 type letters for an Word examle nice or smile , user must have the option for either of the both in the beginning :(
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
ASKER
GetInput INP
STA First
INP
STA Second
GetOption INP
BRZ End
SUB One
BRZ Addition
SUB One
BRZ NICE
BRA GetOption
Addition LDA First
ADD Second
OUT
HLT
Nice LDA XXXX
SUB First
BRP NoSwap
Swap LDA XXXX
STA Result
LDA First
STA Second
LDA Result
STA First
NoSwap LDA End
STA Result
Loop LDA First