Category : Network Files
Archive   : NXCOPY.ZIP
Filename : INTR.I86

 
Output of file : INTR.I86 contained in archive : NXCOPY.ZIP
name Novell_Interface_Routine

assume cs:code

data segment public
data ends

code segment public

public swapl
public intr

swapl proc near
; this routine converts a Pascal LongInt (low-high) to a Novell Long (high-low),
; or vice versa.
pop dx
pop ax
pop bx
xchg bh,al
xchg bl,ah
jmp dx
swapl endp

intr proc near
; this routine provides the interface between Pascal and the Novell function
; calls. note that this routine will not convert words and longs to and from
; PC native format and Novell format; this chore must be handled by the appli-
; cation.
push bp ; save caller's frame pointer
mov bp,sp
push bp ; save my frame pointer
push ds ; save caller's ds...
push es ; es...
pushf ; flags
mov al,byte ptr[bp+8] ; prepare self-modifying code trick
mov cs:byte ptr inter,al ; caller gives us interrupt number
mov ds,word ptr[bp+6] ; address the Pascal record
mov si,word ptr[bp+4]
mov ax,word ptr[si+14]
push ax ; push ds
mov ax,word ptr[si+8]
push ax ; push si
mov ax,word ptr[si] ; load ax
mov bx,word ptr[si+2] ; load bx
mov cx,word ptr[si+4] ; load cx
mov dx,word ptr[si+6] ; load dx
mov di,word ptr[si+10] ; load di
mov bp,word ptr[si+12] ; load bp
mov es,word ptr[si+16] ; load es
pop si ; load si
pop ds ; load ds
db 0cdh ; inline code for an interrupt
inter db 21h
pushf
push ds
push si
push bp
mov bp,sp ; get my frame pointer back
add bp,14
mov bp,word ptr[bp] ; address the Pascal record again
mov ds,word ptr[bp+6]
mov si,word ptr[bp+4]
mov word ptr[si],ax ; store ax
mov word ptr[si+2],bx ; store bx
mov word ptr[si+4],cx ; store cx
mov word ptr[si+6],dx ; store dx
mov word ptr[si+10],di ; store di
mov word ptr[si+16],es ; store es
pop word ptr[si+12] ; store bp
pop word ptr[si+8] ; store si
pop word ptr[si+14] ; store ds
pop word ptr[si+18] ; store flags
popf
pop es
pop ds
pop bp
pop bp
ret 4
intr endp

code ends
end


  3 Responses to “Category : Network Files
Archive   : NXCOPY.ZIP
Filename : INTR.I86

  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/