Subversion Repositories SvarDOS

Compare Revisions

Ignore whitespace Rev 1781 → Rev 1780

/svarlang.lib/trunk/svarlang.c
80,12 → 80,11
* I use pragma aux directives for more compact size. open-watcom only. */
#ifndef WITHSTDIO
 
static unsigned short FOPEN(const char far *s);
static unsigned short FOPEN(const char *s);
 
#pragma aux FOPEN = \
"push ds" \
"push es" \
"pop ds" \
"mov ds, ax" \
"mov ax, 0x3D00" /* open file, read-only (fname at DS:DX) */ \
"int 0x21" \
"jnc DONE" \
92,7 → 91,7
"xor ax, ax" \
"DONE:" \
"pop ds" \
parm [es dx] \
parm [ax dx] \
value [ax];
 
 
138,15 → 137,15
}
 
 
static void FSEEK(unsigned short handle, unsigned short bytes);
 
#pragma aux FSEEK = \
"mov ax, 0x4201" /* move file pointer from cur pos + CX:DX */ \
"xor cx, cx" \
"int 0x21" \
parm [bx] [dx] \
modify [ax cx dx]
 
static void FSEEK(unsigned short handle, unsigned short bytes) {
_asm {
mov ax, 0x4201 /* move file pointer from cur pos + CX:DX */
mov bx, handle
xor cx, cx
mov dx, bytes
int 0x21
}
}
#endif