dgrdo / SuSt Help! Compile with # Use this editor to write Super Stack! code. # Hit "Go", to compile Super Stack! to # Digirule ASM, (ASM appears right below). # See your Super Stack! program executing in # the Program Trace window. # Don't panic, "Help!" is always at the top right # corner. # Here is a simple program that calculates 2+3 in # Super Stack. 2 # Push 2 on the stack 3 # Push 3 on the stack add # Pop 2,3, add them and push the # result on the stack .EQU status_reg=252 .EQU in_dev=253 .EQU out_dev=255 .EQU zero_bit=0 .EQU carry_bit=1 COPYLR stack_offset head_ptr start_program: COPYLR f_add f_custom_ins CALL f_binary_unary HALT f_pop: COPYRA head_ptr CBR carry_bit status_reg SUBLA stack BCRSC zero_bit status_reg JUMP f_stack_error DECR head_ptr COPYIR head_ptr head_val RETURN f_add: COPYRA head_val_1 CBR carry_bit status_reg ADDRA head_val COPYAR head_val RETURN f_custom_ins: .DB 0 head_val: .DB 0 head_val_1: .DB 0 RETURN f_binary_unary: CALL f_pop COPYRR head_val head_val_1 f_unary: CALL f_pop CALLI f_custom_ins CALL f_push RETURN f_stack_error: COPYLR 0xFF out_dev JUMP f_stack_error f_push: COPYRA head_ptr SUBLA 253 BCRSC zero_bit status_reg JUMP f_stack_error COPYRI head_val head_ptr INCR head_ptr RETURN head_ptr: .DB 0 stack: .DB 2,3 stack_offset: Trace title: HTML trace theme: plain dgbeos None Sample projects project_sust_sumstack sust_init_project