mirror of
https://github.com/FDOS/kernel.git
synced 2025-07-27 07:44:09 +02:00
Avoid relocations in the .asm files.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@593 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
ed78089e0b
commit
0abf2824ef
@ -41,14 +41,12 @@ segment HMA_TEXT
|
|||||||
extern _MachineId:wrt DGROUP
|
extern _MachineId:wrt DGROUP
|
||||||
extern critical_sp:wrt DGROUP
|
extern critical_sp:wrt DGROUP
|
||||||
extern _user_r:wrt DGROUP
|
extern _user_r:wrt DGROUP
|
||||||
|
extern _DGROUP_:wrt HMA_TEXT
|
||||||
;
|
;
|
||||||
;
|
;
|
||||||
_DosIdle_int:
|
_DosIdle_int:
|
||||||
push ds
|
push ds
|
||||||
push ax
|
mov ds, [cs:_DGROUP_]
|
||||||
mov ax, DGROUP
|
|
||||||
mov ds,ax
|
|
||||||
pop ax
|
|
||||||
cmp byte [_InDOS],1
|
cmp byte [_InDOS],1
|
||||||
ja DosId1
|
ja DosId1
|
||||||
call Do_DosI
|
call Do_DosI
|
||||||
|
@ -32,9 +32,9 @@
|
|||||||
%include "stacks.inc"
|
%include "stacks.inc"
|
||||||
|
|
||||||
segment HMA_TEXT
|
segment HMA_TEXT
|
||||||
extern _int21_syscall:wrt TGROUP
|
extern _int21_syscall
|
||||||
extern _int21_service:wrt TGROUP
|
extern _int21_service
|
||||||
extern _int2526_handler:wrt TGROUP
|
extern _int2526_handler
|
||||||
extern _error_tos:wrt DGROUP
|
extern _error_tos:wrt DGROUP
|
||||||
extern _char_api_tos:wrt DGROUP
|
extern _char_api_tos:wrt DGROUP
|
||||||
extern _disk_api_tos:wrt DGROUP
|
extern _disk_api_tos:wrt DGROUP
|
||||||
@ -50,6 +50,7 @@ segment HMA_TEXT
|
|||||||
|
|
||||||
extern _Int21AX:wrt DGROUP
|
extern _Int21AX:wrt DGROUP
|
||||||
|
|
||||||
|
extern _DGROUP_
|
||||||
|
|
||||||
global reloc_call_cpm_entry
|
global reloc_call_cpm_entry
|
||||||
global reloc_call_int20_handler
|
global reloc_call_int20_handler
|
||||||
@ -58,7 +59,6 @@ segment HMA_TEXT
|
|||||||
global reloc_call_low_int26_handler
|
global reloc_call_low_int26_handler
|
||||||
global reloc_call_int27_handler
|
global reloc_call_int27_handler
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
; MS-DOS CP/M style entry point
|
; MS-DOS CP/M style entry point
|
||||||
;
|
;
|
||||||
@ -229,7 +229,7 @@ reloc_call_int21_handler:
|
|||||||
; until later when which stack to run on is determined.
|
; until later when which stack to run on is determined.
|
||||||
;
|
;
|
||||||
int21_reentry:
|
int21_reentry:
|
||||||
mov dx,DGROUP
|
mov dx,[cs:_DGROUP_]
|
||||||
mov ds,dx
|
mov ds,dx
|
||||||
|
|
||||||
cmp ah,33h
|
cmp ah,33h
|
||||||
@ -426,7 +426,7 @@ int2526:
|
|||||||
mov dx, ss
|
mov dx, ss
|
||||||
|
|
||||||
cld
|
cld
|
||||||
mov bx, DGROUP
|
mov bx, [cs:_DGROUP_]
|
||||||
mov ds, bx
|
mov ds, bx
|
||||||
|
|
||||||
; setup our local stack
|
; setup our local stack
|
||||||
@ -557,7 +557,7 @@ CritErr05:
|
|||||||
;
|
;
|
||||||
cld
|
cld
|
||||||
cli
|
cli
|
||||||
mov bp, DGROUP
|
mov bp, [cs:_DGROUP_]
|
||||||
mov ds,bp
|
mov ds,bp
|
||||||
mov ss,bp
|
mov ss,bp
|
||||||
mov sp,[critical_sp]
|
mov sp,[critical_sp]
|
||||||
|
@ -33,7 +33,9 @@
|
|||||||
|
|
||||||
segment HMA_TEXT
|
segment HMA_TEXT
|
||||||
extern _cu_psp:wrt DGROUP
|
extern _cu_psp:wrt DGROUP
|
||||||
extern _syscall_MUX14:wrt HMA_TEXT
|
extern _syscall_MUX14
|
||||||
|
|
||||||
|
extern _DGROUP_
|
||||||
|
|
||||||
global reloc_call_int2f_handler
|
global reloc_call_int2f_handler
|
||||||
reloc_call_int2f_handler:
|
reloc_call_int2f_handler:
|
||||||
@ -94,8 +96,7 @@ DriverSysCal:
|
|||||||
extern _Dyn:wrt DGROUP
|
extern _Dyn:wrt DGROUP
|
||||||
cmp al, 3
|
cmp al, 3
|
||||||
jne Int2f?iret
|
jne Int2f?iret
|
||||||
mov di, seg _Dyn
|
mov ds, [cs:_DGROUP_]
|
||||||
mov ds, di
|
|
||||||
mov di, _Dyn+2
|
mov di, _Dyn+2
|
||||||
jmp short Int2f?iret
|
jmp short Int2f?iret
|
||||||
|
|
||||||
@ -134,9 +135,8 @@ IntDosCal:
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
mov ax,DGROUP
|
mov ds,[cs:_DGROUP_]
|
||||||
mov ds,ax
|
extern _int2F_12_handler
|
||||||
extern _int2F_12_handler:wrt TGROUP
|
|
||||||
call _int2F_12_handler
|
call _int2F_12_handler
|
||||||
|
|
||||||
%IFDEF I386
|
%IFDEF I386
|
||||||
|
@ -381,10 +381,7 @@ DiskIntrEntry:
|
|||||||
push ds
|
push ds
|
||||||
push bx
|
push bx
|
||||||
mov bp,sp
|
mov bp,sp
|
||||||
push ax
|
mov ds,[cs:_TEXT_DGROUP]
|
||||||
mov ax,DGROUP
|
|
||||||
mov ds,ax
|
|
||||||
pop ax
|
|
||||||
cld
|
cld
|
||||||
call word [cs:si+1]
|
call word [cs:si+1]
|
||||||
pop cx
|
pop cx
|
||||||
@ -405,10 +402,7 @@ AsmType: mov al,[bx+unit]
|
|||||||
xchg di,ax
|
xchg di,ax
|
||||||
|
|
||||||
les di,[bx+trans]
|
les di,[bx+trans]
|
||||||
push ax
|
mov ds,[cs:_TEXT_DGROUP]
|
||||||
mov ax, DGROUP
|
|
||||||
mov ds,ax
|
|
||||||
pop ax
|
|
||||||
cld
|
cld
|
||||||
jmp word [cs:si+1]
|
jmp word [cs:si+1]
|
||||||
|
|
||||||
|
@ -32,7 +32,8 @@
|
|||||||
|
|
||||||
segment HMA_TEXT
|
segment HMA_TEXT
|
||||||
global _reloc_call_CharMapSrvc
|
global _reloc_call_CharMapSrvc
|
||||||
extern _DosUpChar:wrt TGROUP
|
extern _DosUpChar
|
||||||
|
extern _DGROUP_
|
||||||
;
|
;
|
||||||
; CharMapSrvc:
|
; CharMapSrvc:
|
||||||
; User callable character mapping service.
|
; User callable character mapping service.
|
||||||
@ -51,10 +52,7 @@ _reloc_call_CharMapSrvc:
|
|||||||
push bx
|
push bx
|
||||||
|
|
||||||
push ax ; arg of _upChar
|
push ax ; arg of _upChar
|
||||||
; push ax
|
mov ds,[cs:_DGROUP_]
|
||||||
mov ax,DGROUP
|
|
||||||
mov ds, ax
|
|
||||||
; pop ax
|
|
||||||
|
|
||||||
call _DosUpChar
|
call _DosUpChar
|
||||||
;add sp, byte 2 // next POP retrieves orig AX
|
;add sp, byte 2 // next POP retrieves orig AX
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
segment HMA_TEXT
|
segment HMA_TEXT
|
||||||
|
|
||||||
extern _DGROUP_:wrt LGROUP
|
extern _DGROUP_
|
||||||
|
|
||||||
;
|
;
|
||||||
; Special call for switching processes
|
; Special call for switching processes
|
||||||
@ -123,8 +123,7 @@ segment HMA_TEXT
|
|||||||
_spawn_int23:
|
_spawn_int23:
|
||||||
|
|
||||||
;; 1999/03/27 ska - comments: see cmt1.txt
|
;; 1999/03/27 ska - comments: see cmt1.txt
|
||||||
mov ax, DGROUP ;; Make sure DS is OK
|
mov ds, [cs:_DGROUP_] ;; Make sure DS is OK
|
||||||
mov ds, ax
|
|
||||||
|
|
||||||
; restore to user stack
|
; restore to user stack
|
||||||
cli ;; Pre-8086 don't disable INT autom.
|
cli ;; Pre-8086 don't disable INT autom.
|
||||||
@ -248,8 +247,7 @@ _spawn_int23:
|
|||||||
;; AH value, which is passed to the _respawn_ call
|
;; AH value, which is passed to the _respawn_ call
|
||||||
;; into 0, which is "Terminate program".
|
;; into 0, which is "Terminate program".
|
||||||
push ds ;; we need DGROUP
|
push ds ;; we need DGROUP
|
||||||
mov bp, DGROUP
|
mov ds, [cs:_DGROUP_]
|
||||||
mov ds, bp
|
|
||||||
inc byte [_break_flg]
|
inc byte [_break_flg]
|
||||||
pop ds
|
pop ds
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user