Skip to content

Instantly share code, notes, and snippets.

@alufers
Created January 12, 2021 02:01
Show Gist options
  • Save alufers/e321699c835b9d19194799f66194b229 to your computer and use it in GitHub Desktop.
Save alufers/e321699c835b9d19194799f66194b229 to your computer and use it in GitHub Desktop.
[POLSL] Write subroutine for the W machine
POB d
SDP Write
STP
d: RST 69
Write: LAD Number
POB Zero
DNS
POB Number
SOM Abs
Posit: DZI Ten
MNO Ten
LAD Tmp
POB Number
ODE Tmp
DOD Char0
DNS
POB Tmp
DZI Ten
SOZ End
LAD Number
SOB Posit
Abs: POB Minus
WYP 2
POB Zero
ODE Number
LAD Number
SOB Posit
End: PZS
SOZ GoBack
WYP 2
SOB End
GoBack: PWR
Zero: RST 0
Number: RPA
Tmp: RPA
Ten: RST 10
Char0: RST '0'
Minus: RST '-'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment