Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : FOSCOM.ZIP
Filename : FOSCOM.ASM

 
Output of file : FOSCOM.ASM contained in archive : FOSCOM.ZIP
INCLUDE EXTENDA.INC
name FOSCOM
;
; Author: Jim Nickel
; DLC-WEST BBS (306)-352-9378 - Multi-Line, over 56,000 zipped files online
; Voice : (306)-585-0450
; DLC-West is written in Clipper and uses these routines.
; CIS: 70760,1737
; Fido: 1:140/28
;
; To use these routines you use the Fos_Init routine first.
; You must also have a Fossil Driver loaded. BNU or X00. Always pass the
; COM port where 0 = COM1:, 1 = COM2:, 2 = COM3:, etc.
;
; port = 0
; if .not. Fos_Init(port)
; quit && Fossil driver (like BNU, or X00) is not loaded.
; endif
;
;
CODESEG FOSCOM
DATASEG

CLpublic
CLpublic

CLstatic >, cptr tempptr tempstr>

CLfunc log Fos_Init

CLcode
push es
mov cx,1
mov dx,port
mov ah,4
int 14h
cmp ax,1954h
je portok
mov cx,0
portok:
pop es
CLret cx


CLfunc void Fos_Close

CLcode
push es
mov dx,port
mov ah,5
int 14h
pop es
CLret

CLfunc log Fos_CD

CLcode
push es
mov cx,1
mov dx,port
mov ah,3
int 14h
and al,128
cmp al,128
je cdyes
mov cx,0
cdyes:
pop es
CLret cx


CLfunc void Fos_Parms

CLcode
push es
mov cx,baud
cmp cx,19200
jne c9600
mov al,0
jmp cdatabit
c9600:
cmp cx,9600
jne c4800
mov al,64
jmp cdatabit
c4800:
cmp cx,4800
jne c2400
mov al,192
jmp cdatabit
c2400:
cmp cx,2400
jne c1200
mov al,160
jmp cdatabit
c1200:
cmp cx,1200
jne c600
mov al,128
jmp cdatabit
c600:
cmp cx,600
jne c300
mov al,96
jmp cdatabit
c300:
cmp cx,300
jne c150
mov al,64
jmp cdatabit
c150:
mov al,32
cdatabit:
mov cx,databit
sub cl,5
add al,cl
; assume N parity for now...and 1 stopbit
mov ah,0
mov dx,port
int 14h
pop es
CLret


CLfunc void Fos_Write

CLcode
push es
mov bx,0
mov dx,port
les si,str
wrloop:
mov al,byte ptr es:[bx+si]
cmp al,0
je dwrite
mov dx,port
mov ah,1
int 14h
xor ax,ax
mov ah,2
mov dl,byte ptr es:[bx+si]
int 21h
inc bx
jmp wrloop
dwrite:
pop es
CLret


CLfunc char Fos_Receiv

CLcode
push es
mov cx,0
mov dx,port
mov ah,2
int 14h
push ds
lds si, tempptr
mov byte ptr [si],al
inc si
mov byte ptr [si],0
pop ds
pop es
CLret tempptr


CLfunc log Fos_Avail

CLcode
push es
mov cx,1
mov dx,port
mov ah,3
int 14h
and ah,1
cmp ah,1
je charavail
mov cx,0
charavail:
pop es
CLret cx


CLfunc char Fos_Recvs

CLcode
push es
push ds
lds si, tempptr
mov byte ptr [si],0
mov dx,port
recvloop:
mov ah,3
int 14h
and ah,1
cmp ah,1
je rcharavail
jmp donercv
rcharavail:
mov ah,2
int 14h
mov byte ptr [si],al
inc si
mov byte ptr [si],0
jmp recvloop
donercv:
pop ds
pop es
CLret tempptr

CLfunc void Fos_DTRDWN

CLcode
push es
mov dx,port
mov ah,6
mov al,0
int 14h
pop es
CLret

CLfunc void Fos_DTRUP

CLcode
push es
mov dx,port
mov ah,6
mov al,1
int 14h
pop es
CLret


CLfunc log Fos_Ok2Snd

CLcode
push es
mov cx,1
mov dx,port
mov ah,3
int 14h
and ah,32
cmp ah,32
je okyes
mov cx,0
okyes:
pop es
CLret cx


CLfunc void Fos_Write2

CLcode
push es
mov bx,0
mov dx,port
les si,str
wrloop2:
mov al,byte ptr es:[bx+si]
cmp al,0
je dwrite2
mov ah,1
int 14h
inc bx
jmp wrloop2
dwrite2:
pop es
CLret


CLfunc void Bios_Write

CLcode
push es
mov bx,0
les si,str
bwrloop:
mov dl,byte ptr es:[bx+si]
cmp dl,0
je bwrite
xor ax,ax
mov ah,2
int 21h
inc bx
jmp bwrloop
bwrite:
pop es
CLret

end

  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : FOSCOM.ZIP
Filename : FOSCOM.ASM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/