Skip to content

Commit

Permalink
correct assembly code for OS/2
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalak committed Oct 31, 2020
1 parent 5d915dc commit 3871063
Showing 1 changed file with 18 additions and 26 deletions.
44 changes: 18 additions & 26 deletions bld/cpplib/runtime/a/fshand.asm
Original file line number Diff line number Diff line change
Expand Up @@ -35,47 +35,39 @@
; FSHAND.ASM -- routine providing signature of our FS handler
;

;
; Calling convention depends on Operating system
;
; NT __cdecl
; OS/2 __system
; others __watcall

name FSHAND

ifdef __NT__
THUNK equ ___wcpp_4_fs_handler_
HANDLER equ ___wcpp_4_fs_handler_rtn_
extern C __wcpp_4_fs_handler_rtn_ : proc
public C __wcpp_4_fs_handler_
else
ifndef __386__
suffix equ 1
elseifndef __OS2__
ifdef __REGISTER__
suffix equ 1
endif
endif
ifdef suffix
THUNK equ __wcpp_4_fs_handler__
HANDLER equ __wcpp_4_fs_handler_rtn__
else
THUNK equ __wcpp_4_fs_handler_
HANDLER equ __wcpp_4_fs_handler_rtn_
endif
extern __wcpp_4_fs_handler_rtn_ : proc
public __wcpp_4_fs_handler_
endif

name FSHAND
extern HANDLER : proc

_text segment byte public 'code'
_TEXT segment byte public 'code'

assume cs:_text

public THUNK

THUNK proc near
__wcpp_4_fs_handler_ proc

jmp HANDLER
jmp __wcpp_4_fs_handler_rtn_
db 'W'
db 'A'
db 'T'
db 'C'
db 'O'
db 'M'

THUNK endp
__wcpp_4_fs_handler_ endp

_text ends
_TEXT ends

end

0 comments on commit 3871063

Please sign in to comment.