所以,我已经设法解决了大部分问题,但是如果输入值上升,我只能从最大输出到最小?第一个 = 10,第二个 = 20,第三个 = 30。如果值不同,我将如何正确输出?(比如说,5,1,3?例如)
这是我到目前为止所拥有的:
INP
STA first
INP
STA second
INP
STA third
SUB first
BRP branch1
LDA second
STA third
branch1 LDA third
SUB second
BRP branch2
LDA first
STA third
branch2 LDA third
OUT
LDA first
SUB second
BRP branch3
LDA second
OUT
branch3 LDA first
OUT
HLT
first DAT
second DAT
third DAT