* WriteString.asm (of PCQ Pascal runtime library) * Copyright (c) 1989 Patrick Quaid * Writes a string to a text file. SECTION ONE XREF _p%DOSBase XREF _LVOWrite XREF _p%padout XDEF _p%writestring _p%writestring move.l d0,d2 move.l d0,a0 move.l 6(sp),d1 move.l #-1,d3 1$ addq.l #1,d3 ; first find the length 2$ tst.b 0(a0,d3.l) bne 1$ tst.l d3 beq.s 3$ move.w 4(sp),d0 ext.l d0 sub.l d3,d0 ble.s 4$ jsr _p%padout 4$ move.l _p%DOSBase,a6 jsr _LVOWrite(a6) 3$ rts END