mirror of
https://github.com/FDOS/kernel.git
synced 2025-05-03 06:10:27 +02:00
improve comments regarding call PSP:5 patch
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1375 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
0d16215fef
commit
d9e2861a44
@ -68,12 +68,10 @@ typedef struct {
|
|||||||
BYTE ps_fill1; /* 04 single char fill=0 */
|
BYTE ps_fill1; /* 04 single char fill=0 */
|
||||||
|
|
||||||
/* CP/M-like entry point */
|
/* CP/M-like entry point */
|
||||||
/* offsets 5-9 are a far call to absolute address 0:000Ch
|
/* offsets 5-9 are a far call to absolute address 0:00C0h
|
||||||
coded so that CP/M apps can do a near call to psp:5, does a
|
encoded using 1MB wrap form of address (e.g. 0F01D:FEF0h)
|
||||||
far call but ensures word at offset 6 is size of COM file
|
for compatiblity with CP/M apps that do a near call to psp:5
|
||||||
e.g. FEF0h by using 1MB wrap around address 0F01D:FEF0
|
and expect size (KB) of allocated segment in word at offset 6 */
|
||||||
(jmp code stored at 0:000C should be duplicated in HMA FFFF:00D0)
|
|
||||||
Note: MS-DOS has value as FEEE which wraps to 0:00BEh */
|
|
||||||
UBYTE ps_farcall; /* 05 far call opcode */
|
UBYTE ps_farcall; /* 05 far call opcode */
|
||||||
VOID(FAR ASMCFUNC * ps_reentry) (void); /* 06 re-entry point */
|
VOID(FAR ASMCFUNC * ps_reentry) (void); /* 06 re-entry point */
|
||||||
|
|
||||||
|
@ -68,9 +68,12 @@ segment HMA_TEXT
|
|||||||
; For CP/M compatibility allow a program to invoke any DOS API function
|
; For CP/M compatibility allow a program to invoke any DOS API function
|
||||||
; between 0 and 24h by doing a near call to psp:0005h which embeds a far call
|
; between 0 and 24h by doing a near call to psp:0005h which embeds a far call
|
||||||
; to absolute address 0:00C0h (int vector 30h & 31h) or FFFF:00D0 (hma).
|
; to absolute address 0:00C0h (int vector 30h & 31h) or FFFF:00D0 (hma).
|
||||||
; Note: int 31h is also used for DPMI
|
; 0:00C0h contains the jmp instruction to reloc_call_cpm_entry which should
|
||||||
; Upon entry the stack has a near return offset (desired return address) and
|
; be duplicated in hma to ensure correct operation with either state of A20 line.
|
||||||
; far return seg:offset (useless return to data at offset 0ah after far call
|
; Note: int 31h is also used for DPMI but only in protected mode.
|
||||||
|
; Upon entry the stack has a near return offset (desired return address offset)
|
||||||
|
; and far return seg:offset (desired return segment of PSP, and useless offset
|
||||||
|
; which if used will return to the data, not code, at offset 0ah after far call
|
||||||
; in psp). We convert it to a normal call and correct the stack to appear same
|
; in psp). We convert it to a normal call and correct the stack to appear same
|
||||||
; as if invoked via an int 21h call including proper return address.
|
; as if invoked via an int 21h call including proper return address.
|
||||||
;
|
;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user