BBS: Inland Empire Archive Date: 12-22-92 (12:22) Number: 393 From: DIK COATES Refer#: NONE To: HUGH MARTIN Recvd: NO Subj: Re: far string access Conf: (2) Quik_Bas
>>>> QUOTING Hugh Martin to Dik Coates <<<<
HM> called by your program are pulled from the library. SMAK supports
HM> this too and allows you to create the smallest EXE possible, using
HM> multiple libraries, stub files, and compile/link switches.
Thanks for info... will be chattin' in the New Year... have included part
of macro re NUL appended string...
shr cx, 1 ;divide by 2 to move words
rep movsw ;until cx is 0
jnc @f ;if odd num of bytes in string, carry flag set
movsb ;move last byte if odd number
@@: mov es:[di], cl ;add terminating NUL es:ax points to buff80
mov ofset, ax
mov ax, es
mov segmnt, ax ;exit with segmnt:ofset pointing buff80
ofset and segmnt are macro args... This is approach I use for NUL
termination of BASIC strings... Macro can be called with ds:dx and returns
ds as segmnt and dx as ofset...
Regards and Season's Greetings, Dik, Oshawa, Canada
... Free Canada... inside every box of Maple Flakes! -Dik
___ Blue Wave/QWK v2.10
--- Maximus 2.00
* Origin: Durham Systems (ONLINE!) (1:229/110)

Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET