MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
User Input INP
Store Input STA TEST
Start + Load Second START LDA SECOND
Subtract Test SUB TEST
Initiate Loop BRP GREATER
Initiate Loop BRZ EQUAL
Initiate Loop BRZ END
Define + Load second GREATER LDA SECOND
Add to First ADD FIRST
Save as Next STA NEXT
Load Second LDA SECOND
Save as First STA FIRST
Load Next LDA NEXT
Save as Second STA SECOND
Load Counter LDA COUNTER
Add to Value ADD INCREM
Save as Counter STA COUNTER
Close Loop BRA START
Define + Load Second EQUAL LDA COUNTER
Output OUT
Stop HLT
Stop END HLT
Define Test = 0 TEST DAT 000
Define First = 1 FIRST DAT 001
Define Next = 0 NEXT DAT 000
Define Second = 1 SECOND DAT 001
Set Counter = 2 COUNTER DAT 002
Set Increment 1 INCREM DAT 001
User Input INP
Store Input STA TEST
Start + Load Second START LDA TEST
Subtract Test SUB SECOND
Initiate Loop BRP GREATER
Initiate Loop BRZ EQUAL
Define + Load second GREATER LDA SECOND
Add to First ADD FIRST
Save as Next STA NEXT
Load Second LDA SECOND
Save as First STA FIRST
Load Next LDA NEXT
Save as Second STA SECOND
Load Counter LDA COUNTER
Add to Value ADD INCREM
Save as Counter STA COUNTER
Close Loop BRA START
Define + Load Second EQUAL LDA COUNTER
Output OUT
Stop HLT
Stop END HLT
Define Test = 0 TEST DAT 000
Define First = 1 FIRST DAT 001
Define Next = 0 NEXT DAT 000
Define Second = 1 SECOND DAT 001
Set Counter = 2 COUNTER DAT 002
Set Increment 1 INCREM DAT 001
INP
STA TEST
START LDA TEST
SUB SECOND
BRZ EQUAL
BRP GREATER
BRA END
GREATER LDA SECOND
ADD FIRST
STA NEXT
LDA SECOND
STA FIRST
LDA NEXT
STA SECOND
LDA COUNTER
ADD INCREM
STA COUNTER
BRA START
EQUAL LDA COUNTER
OUT
HLT
END HLT
TEST DAT 000
FIRST DAT 001
NEXT DAT 000
SECOND DAT 001
COUNTER DAT 002
INCREM DAT 001
INP
STA TEST
START LDA TEST
SUB SECOND
BRZ EQUAL
BRP GREATER
BRA END
GREATER LDA SECOND
ADD FIRST
STA NEXT
LDA SECOND
STA FIRST
LDA NEXT
STA SECOND
LDA COUNTER
ADD INCREM
STA COUNTER
BRA START
EQUAL LDA COUNTER
OUT
HLT
END LDA ZERO
OUT
HLT
TEST DAT 000
FIRST DAT 001
NEXT DAT 000
SECOND DAT 001
COUNTER DAT 002
INCREM DAT 001
ZERO DAT 000
If you are experiencing a similar issue, please ask a related question
Title | # Comments | Views | Activity |
---|---|---|---|
Selection.Words.Count in Microsoft Word | 13 | 533 | |
3d points from stereo 2d point arrays. | 1 | 149 | |
Stanford NLP enhance splitting a line to sentences | 10 | 321 | |
Decrease number proportionately | 20 | 94 |
Join the community of 500,000 technology professionals and ask your questions.