QBSWAP?

 BBS: Inland Empire Archive
Date: 01-09-93 (07:13)             Number: 396
From: LUIS ESPINOZA                Refer#: NONE
  To: FRANCOIS ROY                  Recvd: NO  
Subj: QBSWAP?                        Conf: (2) Quik_Bas
On (07 Jan 93) Francois Roy wrote to Eric B. Ford...

 FR>  (Why do I feel I've said this about 10 times?)  File Request
 FR> QBSWAP.ZIP (about 50K), speeds to 14,400cps.  If you call in as a
 FR> human, you have to be registered before getting access, so if I ain't
 FR> at the helm at the time, you may be throwing nickels at Ma Bell...
 FR>

        Actually, if you can find SWAP300 on a local board, here is my
interface for it. If you would like the OBJ, I can UUENCODE it.
        Swap300 is about an 83k file you probably can find locally.
        And this rotuine may NOT be published in any form without
written consent. However you may use it freely.

                                        Luis

Here is my batch file to compile it into a lib/qlb.

del swap.qlb
del swap.obj
del swap.lib
tasm /mx /JMASM51 /D_Medium /Dall SWAP,,swap;
tasm /mx PDSSWAP,,pdsswap;
LIB swap.lib + swap + pdsswap + \lang\bc7\lib\qbx.lib;
LINK /Q swap.lib, swap.qlb,,\lang\bc7\lib\qbxqlb.lib;


And here is PDSWAP.ASM


.model  medium,basic

extrn   StringAssign:Far
extrn   StringLength:Far
extrn   _Swap:Far

public  SwapOut


                maxst = 128

.code

Pgmnam  db      128 dup (?)
Cmdlin  db      128 dup (?)
swpfil  db      128 dup (?)

NullStr         proc    uses si,s1:word,s2:word
                push    ds
                push    [s1]
                xor     ax,ax
                push    ax
                push    cs
                push    [s2]
                mov     ax,maxst
                push    ax
                call    StringAssign
                push    [s1]
                call    StringLength
                mov     si,[s2]
                add     ax,si
                mov     si,ax
                mov     byte ptr cs:[si],0
                ret
NullStr         endp


SwapOut         proc    s1:Word, s2:Word, se:word, s3:word
                push    [s1]
                lea     ax,Pgmnam
                push    ax
                call    NullStr
                push    [s2]
                lea     ax,cmdlin
                push    ax
                call    NullStr
                push    [s3]
                lea     ax,swpfil
                push    ax
                call    NullStr
                push    cs
                lea     ax,swpfil
                push    ax
                push    ds
                mov     ax,[se]
                push    ax
                push    cs
                lea     ax,cmdlin
                push    ax
                push    cs
                lea     ax,pgmnam
                push    ax
                call    _swap
                add     sp,16
                ret
SwapOut         endp
                end





--- PPoint 1.33
 * Origin: The Rubber Room (1:207/213.5)
Outer Court
Echo Basic Postings

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