Skip to Content
Amiga Assembly Library v41.21 — Motorola 68020 shared library for Commodore Amiga

LineInput

Synopsis

len = LineInput(buffer, chars, Handle) D0 A0 D0 D1

C Prototype

ULONG LineInput(APTR buffer, ULONG chars, BPTR Handle);

Description

This function obtains an input channel from the specified Handle. It can be used, by passing a CON window handle, to receive keyboard input.

Inputs

  • buffer — Address of a buffer that will contain the data read.
  • chars — Maximum number of characters to read.
  • Handle — Address of a Handle opened by dos.library/Open().

Result

  • len — Number of characters read.

See Also

dos.library/Open(), dos.library/Input()

Implementation

The original 68020 assembly implementation:

; (15-Feb-1995) --- len = LineInput(buffer, chars, Handle) (a0/d0,d1) _LVOLineInput tst.l d0 beq.s LInput_Exit movem.l d2-d3/a6,-(sp) move.l ab_DosBase(a6),a6 move.l d0,d3 move.l a0,d2 tst.l d1 bne.s LI_Handle jsr _LVOInput(a6) move.l d0,d1 LI_Handle jsr _LVORead(a6) move.l d2,a0 movem.l (sp)+,d2-d3/a6 LInput_Exit rts
Last updated on