From e2a62732f504cca5db8fb8d6d38ca64dfd4b92ac Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Thu, 28 Nov 2024 22:33:53 +0000 Subject: New upstream version 6.0.24.51 --- asmDOSAPI.asm | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 asmDOSAPI.asm (limited to 'asmDOSAPI.asm') diff --git a/asmDOSAPI.asm b/asmDOSAPI.asm new file mode 100644 index 0000000..bda758e --- /dev/null +++ b/asmDOSAPI.asm @@ -0,0 +1,136 @@ +IF 0 + +Copyright 2001-2015 John Wiseman G8BPQ + +This file is part of LinBPQ/BPQ32. + +LinBPQ/BPQ32 is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +LinBPQ/BPQ32 is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses + +ENDIF + +IFNDEF BPQ64 + + PAGE 56,132 +; + +.386 +; +; SEGMENT definitions and order +; + + +;* 32 Bit code +_TEXT SEGMENT DWORD USE32 PUBLIC 'CODE' +_TEXT ENDS + + + +;* Contains 32 Bit data +_BPQDATA SEGMENT DWORD PUBLIC 'DATA' +_BPQDATA ENDS + + + ASSUME CS:FLAT, DS:FLAT, ES:FLAT, SS:FLAT + +OFFSET32 EQU + +_BPQDATA SEGMENT + + extern _APISemaphore:DWORD + +ApiEAX DD 0; +ApiEBX DD 0; +ApiECX DD 0; +ApiEDX DD 0; +ApiESI DD 0; +ApiEDI DD 0; + +_BPQDATA ENDS + +_TEXT SEGMENT +; + EXTRN _CHOSTAPI:NEAR +MARKER DB 'G8BPQ' ; MUST BE JUST BEFORE INT 7F ENTRY + DB 4 ; MAJORVERSION + DB 9 ; MINORVERSION + + + PUBLIC _BPQHOSTAPI +_BPQHOSTAPI: +; +; SPECIAL INTERFACE, MAINLY FOR EXTERNAL HOST MODE SUPPORT PROGS +; + extrn _GetSemaphore:near + extrn _FreeSemaphore:near + extrn _Check_Timer:near + + + pushad + call _Check_Timer + push offset _APISemaphore + call _GetSemaphore + add esp, 4 + popad + +; Params are 16 bits + + movzx eax,ax + movzx ebx,bx + movzx ecx,cx + movzx edx,dx + + mov ApiEAX, eax + mov ApiEBX, ebx + mov ApiECX, ecx + mov ApiEDX, edx + mov ApiESI, esi + mov ApiEDI, edi + + lea eax,ApiEDI + push eax + lea eax,ApiESI + push eax + lea eax,ApiEDX + push eax + lea eax,ApiECX + push eax + lea eax,ApiEBX + push eax + lea eax,ApiEAX + push eax + + call _CHOSTAPI + add esp, 24 + + mov eax,ApiEAX + mov ebx,ApiEBX + mov ecx,ApiECX + mov edx,ApiEDX + mov esi,ApiESI + mov esi,ApiEDI + + + pushad + push offset _APISemaphore + call _FreeSemaphore + add esp, 4 + popad + + ret + +_TEXT ENDS +ENDIF + +END + -- cgit v1.2.3