logisim-stuff/TK16/TK16 programs/inc.asm

12 lines
286 B
NASM
Raw Normal View History

2015-01-04 15:24:53 -06:00
;to use put vaue to inc by in adress 0 get res out of adress 1
.dseg
inc: .alloc 1
res: .alloc 1
.cseg
inc:
loadb inc; loads inc value
loada res; loads previous result is zero if just started.
add; adds inc value and previous result
store res; stores result
jump inc; jump to beginning