Specifications
LNLINE is the Length of uNpacked LINES. The routine requires 24 words.
EDIT: MOV # INSTRING, RO ; set up input byte pointer
MOV #OUTSTRING, Rl
; set up output byte pointer
MOV #EOLCHAR, R2
; put high use constant in reg.
MOV #SPCHAR, R3 ; to save time in loop
NOLINE: MOV #LNLINE, R4 ; R4 holds # char left in line
NXTCHR: MOVB (RO) + ,R5 ; get next byte
CMP R5, R2 ; end of line?
BEQ FILINE ; if yes, fill line
CMP R5, R3 ; blank?
BEQ NXTCHR
; if yes, skip character
DEC R4
; decrement # of characters left in line
MOVB R5, (Rl) + ; move byte to output string
BR NXTCHR
; continue
FILINE:
CLRB (Rl) +
; put a blank byte in output
DEC R4
; decrement # char left
BNE FILINE
; continue if not end
CHKEND: CMPB (RO), #EORCHAR ; end of record?
BNE NULINE
; if not EOR, start next line
Single Operand Byte Instructions-
CLeaR Byte CLRB dst _ 2.3~
‘I lOI I 15, I rot
dst
I I I I I
t5 6 5
0
Operation: 0 + (dst)
Condition Codes: Set on the byte result as in CLR
Description: Same as CLR
INCrement Byte INCB dst
2.3~
‘I 101
I
15,
I 121
dst
I I I # I
15 6 5 0
Operation: (dst) + 1 + (dst)
Condition Codes: Set on the byte result as in INC
Description: Same as INC. The carry from a byte does not affect any other
byte.
OECrcmcnt Byte
OECBdst
2.3~
1 1 oi 1
5
I I I
3
dst
I 1
I I
15
6 5
0
bperation: (dst) - 1 + (dst)
Condition Codes: Set on the byte result as in DEC
Description: Same as DEC.
38