|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 2304 (0x900) Types: TextFile Names: »lmitxt082«
└─⟦2c55ea56f⟧ Bits:30001844 SW-save af projekt 1000, Alarm-system └─⟦093e2ad1c⟧ └─⟦this⟧ »lmitxt082«
;; ;; unsigned and modulo arithmetic ;; ;; file: lmitxt082 ;; ;; .instruction madd , prepdyad ; w3:=w3+w2,,cjp wrfetch ; ; .instruction msub , prepdyad ; w3:=w3-w2,,cjp wrfetch ; ; .instruction uadd , prepdyad ; ;; ;; param:: none; ;; stack:: op1, op2: word -> sum: word; ;; w3:=w3+w2,s,ldct aritovf ; res:= op1+op2; goto if not carry ,,jrp not acy wrfetch ; then wrfetch(res) else aritovf(res); ;; .instruction usub , prepdyad ; ;; ;; param:: none; ;; stack:: op1, op2: word -> dif: word; ;; w3:=w3-w2,s,ldct aritovf ; dif:= op2-op1; goto if carry ,,jrp acy wrfetch ; then wrfetch(dif) else aritovf(dif); ;; .instruction umul , prepdyad ; ;; ;; param:: none; ;; stack:: f1, f2: word -> pro: word; ;; w1:=0,, ; w4:=w3,,cjs unsmult ; pro:= unsmult(f1,f2); w1,s,cjp mul3 ; goto mul3; .p ; ;; .instruction udiv , prepdyad ; ;; ;; param:: none; ;; stack:: op1, op2: word -> quo: word; ;; w2,s, ; if op1 = 0 then goto zerodiv; q:=w3,,cjp zro div6 ; w1:=w1-w1,,cjs unsdiv ; quo:= op2 / op1; w3:=q,,cjp wrfetch ; goto wrfetch(quo); ;; .instruction umod , prepdyad ; ;; ;; param:: none; ;; stack:: op1, op2: word -> rem: word; ;; w2,s, ; if op1 = 0 then goto zerodiv; q:=w3,,cjp zro div6 ; w1:=w1-w1,,cjs unsdiv ; rem:= op2 mod op1; w3:=w1,,cjp wrfetch ; goto wrfetch(rem); ;; ;; end of lmitxt082 ;; .p ; ▶EOF◀