Here is a simple getline() implemented with ASM based on the "shell" of <AOA>(DOS version), using some features of UCR1.0. Actually I changed the "shell" a little at the end of the file.
original:
zzzzzzseg segment para public 'zzzzzz'
present:
zzzzzzseg segment para public 'zzzzzzseg'
For I can't even assemble the source file without this modification.(Any one to explain this?)

The problem is that CodeView reports that there is an illegal instruction when meeting the following line.
jnc GoodMemInit

cseg segment para public 'code'
assume cs:cseg, ds:dseg
; Variables that wind up being used by the standard library routines.
; The MemInit routine uses "PSP" and "zzzzzzseg" labels. They must be
; present if you intend to use getenv, MemInit, malloc, and free.
public PSP
PSP dw ?
;--------------------------------------------
; Here is a good place to put other routines:
;-----------------------------------------------------------------
; Main is the main program. Program execution always begins here.
Main proc
mov cs:PSP, es ;Save pgm seg prefix
mov ax, seg dseg ;Set up the segment registers
mov ds, ax
mov es, ax