相关代码 |
|
;2000年高级程序员考试下午Casl汇编试题 ;改动后已经可以直接运行 START LEA GR1,DAT BEG PUSH 0,GR1 PUSH 0,GR2 PUSH 0,GR3 L1 LD GR2,0,GR1 LEA GR0,0,GR2 JMI FINISH LD GR3,1,GR1 LEA GR2,0,GR3 AND GR2,C7FFF JZE L3 SRL GR3,15 LEA GR2,-1,GR2 L2 ADD GR0,BONUS,GR3 LEA GR2,-4,GR2 JPZ L2 L3 ST GR0,2,GR1 LEA GR1,3,GR1 JMP L1 FINISH POP GR3 POP GR2 POP GR1 EXIT C7FFF DC #7FFF BONUS DC 10 DC -5 DAT DC 1000,100,0,-1 END