1
0
mirror of https://github.com/PDP-10/its.git synced 2026-03-01 09:40:56 +00:00
Files
PDP-10.its/src/hello/hello.palx
2023-09-04 18:46:29 +02:00

40 lines
659 B
Plaintext

;Hello world for the PDP-11 cross assembler PALX, running in the 11SIM
;PDP-11 emulator. To assemble, type
; :CWD HELLO
; :PALX HELLO PALX
;To run, type
; :PDP11
; ;L HELLO BIN
; ;G
.TITLE HELLO
R0=%0
R1=%1
SP=%6
PC=%7
TPS=177564 ;Console output status
TPB=177566 ;Console output data
.=1000
GO: MOV #STACK,SP ;Initialize stack pointer
MOV #HELLO,R0 ;Point to start of string
LOOP: MOVB (R0)+,R1 ;Get one character
BEQ STOP ;Stop if zero
JSR PC,TYO
JMP LOOP
STOP: HALT
TYO: TSTB TPS ;Console ready for output?
BPL TYO ;If not, check again
MOV R1,TPB ;Send character
RTS PC
.=.+100
STACK:
HELLO: .ASCIZ /Hello world!
/
.END GO