mirror of https://github.com/FDOS/kernel.git
Use pascal calling conventions for all clock related asm functions.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@852 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
c5f6ed4aa8
commit
c415f74ee4
|
@ -32,12 +32,11 @@
|
|||
|
||||
segment HMA_TEXT
|
||||
|
||||
global _getvec
|
||||
_getvec:
|
||||
global GETVEC
|
||||
GETVEC:
|
||||
pop ax ; return address
|
||||
pop bx ; int #
|
||||
push bx ; restore stack
|
||||
push ax
|
||||
push ax ; restore stack
|
||||
add bx,bx
|
||||
add bx,bx ; Multiply by 4
|
||||
xor dx,dx ; and set segment to 0
|
||||
|
|
|
@ -33,11 +33,10 @@
|
|||
segment HMA_TEXT
|
||||
|
||||
;
|
||||
; BOOL ReadPCClock(Ticks)
|
||||
; ULONG *Ticks;
|
||||
; ULONG ReadPCClock(void)
|
||||
;
|
||||
global _ReadPCClock
|
||||
_ReadPCClock:
|
||||
global READPCCLOCK
|
||||
READPCCLOCK:
|
||||
mov ah,0
|
||||
int 1ah
|
||||
extern _DaysSinceEpoch ; ; update days if necessary
|
||||
|
|
|
@ -39,25 +39,25 @@ segment HMA_TEXT
|
|||
; BYTE bcdMinutes;
|
||||
; BYTE bcdSeconds;
|
||||
;
|
||||
global _WriteATClock
|
||||
_WriteATClock:
|
||||
global WRITEATCLOCK
|
||||
WRITEATCLOCK:
|
||||
push bp
|
||||
mov bp,sp
|
||||
; bcdSeconds = 10
|
||||
; bcdMinutes = 8
|
||||
; bcdHours = 6
|
||||
; bcdDays = 4
|
||||
mov ch,byte [bp+6] ;bcdHours
|
||||
mov cl,byte [bp+8] ;bcdMinutes
|
||||
mov dh,byte [bp+10] ;bcdSeconds
|
||||
; bcdSeconds = 4
|
||||
; bcdMinutes = 6
|
||||
; bcdHours = 8
|
||||
; bcdDays = 10
|
||||
mov ch,byte [bp+8] ;bcdHours
|
||||
mov cl,byte [bp+6] ;bcdMinutes
|
||||
mov dh,byte [bp+4] ;bcdSeconds
|
||||
mov dl,0
|
||||
mov ah,3
|
||||
int 1ah
|
||||
mov bx,word [bp+4] ;bcdDays
|
||||
mov bx,word [bp+10] ;bcdDays
|
||||
mov dx,word [bx]
|
||||
mov cx,word [bx+2]
|
||||
mov ah,5
|
||||
int 1ah
|
||||
pop bp
|
||||
ret
|
||||
ret 8
|
||||
|
||||
|
|
|
@ -36,15 +36,13 @@ segment HMA_TEXT
|
|||
; VOID WritePCClock(Ticks)
|
||||
; ULONG Ticks;
|
||||
;
|
||||
global _WritePCClock
|
||||
_WritePCClock:
|
||||
global WRITEPCCLOCK
|
||||
WRITEPCCLOCK:
|
||||
; Ticks = 4
|
||||
pop ax ; return address
|
||||
pop dx
|
||||
pop cx ; Ticks
|
||||
push cx ; restore stack
|
||||
push dx
|
||||
push ax
|
||||
push ax ; restore stack
|
||||
mov ah,1
|
||||
int 1ah
|
||||
ret
|
||||
|
|
|
@ -366,36 +366,22 @@ COUNT ASMCFUNC
|
|||
CriticalError(COUNT nFlag, COUNT nDrive, COUNT nError,
|
||||
struct dhdr FAR * lpDevice);
|
||||
|
||||
#ifdef PROTO
|
||||
VOID ASMCFUNC FAR CharMapSrvc(VOID);
|
||||
#if 0
|
||||
VOID ASMCFUNC FAR set_stack(VOID);
|
||||
VOID ASMCFUNC FAR restore_stack(VOID);
|
||||
#endif
|
||||
/*VOID INRPT FAR handle_break(VOID); */
|
||||
BOOL ASMCFUNC ReadATClock(BYTE *, BYTE *, BYTE *, BYTE *);
|
||||
ULONG ASMCFUNC ReadPCClock(VOID);
|
||||
VOID ASMCFUNC WriteATClock(BYTE *, BYTE, BYTE, BYTE);
|
||||
VOID ASMCFUNC WritePCClock(ULONG);
|
||||
BYTE FAR * ASMCFUNC device_end(VOID);
|
||||
COUNT ASMCFUNC kb_data(VOID);
|
||||
COUNT ASMCFUNC kb_input(VOID);
|
||||
COUNT ASMCFUNC kb_init(VOID);
|
||||
VOID ASMCFUNC setvec(UWORD, intvec);
|
||||
intvec ASMCFUNC getvec(UWORD);
|
||||
COUNT con(COUNT);
|
||||
#else
|
||||
VOID FAR CharMapSrvc();
|
||||
VOID FAR set_stack();
|
||||
VOID FAR restore_stack();
|
||||
WORD execrh();
|
||||
VOID exit();
|
||||
/*VOID INRPT FAR handle_break(); */
|
||||
BYTE FAR *device_end();
|
||||
COUNT kb_data();
|
||||
COUNT kb_input();
|
||||
COUNT kb_init();
|
||||
VOID setvec();
|
||||
intvec getvec();
|
||||
COUNT con();
|
||||
|
||||
ULONG ASMPASCAL ReadPCClock(VOID);
|
||||
VOID ASMPASCAL WriteATClock(BYTE *, BYTE, BYTE, BYTE);
|
||||
VOID ASMPASCAL WritePCClock(ULONG);
|
||||
intvec ASMPASCAL getvec(UWORD);
|
||||
#ifdef __WATCOMC__
|
||||
#pragma aux (pascal) ReadPCClock modify exact [ax cx dx]
|
||||
#pragma aux (pascal) WriteATClock modify exact [ax bx cx dx]
|
||||
#pragma aux (pascal) WritePCClock modify exact [ax cx dx]
|
||||
#pragma aux (pascal) getvec modify exact [ax bx dx es]
|
||||
#endif
|
||||
|
||||
/* */
|
||||
|
|
Loading…
Reference in New Issue