*   ASSEMBLY ROUTINE TO GENERATE A STRING THAT FILLS THE USER SPACE
*
SYSCALL$ EQU    $FB
	IFUND	M6800
TEMPA	EQU	0
TEMPB	EQU	1
TEMPX	EQU	0
	FIN
CONSTRUCTDYNAMICSTRING$
    PULD
    STD  JMPADDRESS
    STS  0          = ROUGHLY WHERE TOP OF STRING IS
    LDD  0
    SUBD #$100      USE THIS FOR END OF TEXT$
    SUBD .PROGSTART+$A = LENGTH OF TEXT$
    LDX  .PROGSTART+$A = END OF RAM SPACE OF SCREEN EDITOR
    STD  0,X        PUT TEXT$ LENGTH THERE...
    LDD  #$FFFF     = THE "WHOLE" STRING
    PSHD            CONSTRUCT STRING DESCRIPTOR OF DUMMY STRING AS RESULT
    PSHX            = STRING HEAD
    DES             (TRASH BYTE)
    LDAA #1         FUNNY MARK FOR STRING DESCRIPTOR
    PSHA
    CLC
    $7E
JMPADDRESS FDB 0          EXIT ADDRESS

    END  .PROGSTART
