/************************************************************ * module name: text04.sim * * public procedure: printline. * ************************************************************/ pline: do; write: procedure(a, b, c, d) external; declare (a, b, c, d) address; end; declare decnum(5) byte initial (' 0 '); /************************************************************ * lino - converts integer into numereic character * ************************************************************/ lino: procedure(numb); declare numb address, (char, i) byte; i = 3; do while numb > 0 and (i + 1) > 0; char = numb mod 10; numb = (numb - char) / 10; decnum(i) = char + 48; /* char '0' to '9' */ i = i - 1; end; end lino; $eject /************************************************************ * printline - print the line number of the command * * line from source file, where error is * * detected. * ************************************************************/ printline: procedure(numb) public; declare numb address, i byte, status address; do i = 0 to 3; decnum(i) = ' '; end; call lino(numb); call write(0, .decnum, 5, .status); end printline; end pline; eof