TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Ian Binnie
from: Paul Edwards
date: 1996-04-28 04:20:14
subject: C Compiler

IB> PS I use a registered version which also has a command line compiler (as
IB> well as a manual). 

I was wondering if you could answer a question for me.  I am
trying to compile MSGED/SQ using Pacific C, and with a swag of
changes, was able to get to the stage of it compiling.  However,
for it to link, I need to use some assembler code.  I am including
an example in here of some of the assembler code.  However, the
methods I attempted to use to get it to link, didn't work (I used
tasm -oi to assemble, then hlink or tlink to link, neither were
happy).  as86 wouldn't assemble my code.

Is it possible to use assembler and pacific c?  There are some
shareware assemblers around, I was hoping I could use that and
paific C, so that people can do work on MSGED without NEEDING a
compiler, and then send me the code diffs so that I can 
recompile them myself.

BFN.  Paul.

; Written by Paul Edwards and either John Dennis or Jim Nutt or both
; Released to the public domain

.model large

.code

public _dospause, _dvpause, _winpause, _dvcheck, _kbdhit, _obtkey, _dosavmem


_dospause proc

	int 28h
	ret

_dospause endp


_dvpause proc

    mov ax, 101ah
    int     15h
    mov     ax,1000h
    int     15h
    mov     ax,1025h
    int     15h
    ret
    
_dvpause endp


_winpause proc

    mov     ax,1680h
    int     2fh
    ret
    
_winpause endp


_dvcheck proc
                
    mov     cx,4445h
    mov     dx,5351h
    mov     ax,2b01h
    int     21h
    mov     dx,0
    cmp     al,0ffh
    je      No_Dv
    mov     dx,1
No_Dv:
    mov     ax,dx
    ret

_dvcheck endp


_kbdhit proc
       
    mov     ah,1
    int     16h
    jz      No_Key
    mov     ax,1
    jmp     kbdfin
No_Key:
    mov     ax,0
kbdfin:
    ret

_kbdhit endp


_obtkey proc

    mov     ah,0h
    int     16h
    cmp     al,0h
    je      endkey
    mov     ah, 0h ; must use fossil keymap, no scan code if have char
endkey:    
    ret
    
_obtkey endp


_dosavmem proc

    push    bp
    mov     bp,sp
    push    es
    push    bx
    
    mov     ah,48h
    mov     bx,0ffffh
    int     21h
    jc      nomem
    mov     es,ax
    mov     ah,49h
    int     21h
    mov     bx,0ffffh
nomem:

    mov     ax,bx
    
    pop     bx
    pop     es
    pop     bp
    ret        
_dosavmem endp    

end
@EOT:

---
* Origin: X (3:711/934.9)

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.