FreeDOS/hdr/stacks.inc
Jim Tabor 214dfed06b See history.txt
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@57 6ac86273-5f31-0410-b378-82cca8765d1b
2000-08-06 04:18:21 +00:00

155 lines
4.0 KiB
PHP

;
; File:
; stacks.inc
; Description:
; Macro support for register stack frame
;
; Copyright (c) 1998
; Pasquale J. Villani
; All Rights Reserved
;
; This file is part of DOS-C.
;
; DOS-C 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
; 2, or (at your option) any later version.
;
; DOS-C 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 DOS-C; see the file COPYING. If not,
; write to the Free Software Foundation, 675 Mass Ave,
; Cambridge, MA 02139, USA.
;
; $Logfile: C:/dos-c/hdr/stacks.inv $
;
; $Id$
;
; $Log$
; Revision 1.5 2000/08/06 04:18:21 jimtabor
; See history.txt
;
; Revision 1.4 2000/05/26 19:46:52 jimtabor
; Read History file for Change info
;
; Revision 1.3 2000/05/25 20:56:19 jimtabor
; Fixed project history
;
; Revision 1.2 2000/05/08 04:28:22 jimtabor
; Update CVS to 2020
;
; Revision 1.1.1.1 2000/05/06 19:34:53 jhall1
; The FreeDOS Kernel. A DOS kernel that aims to be 100% compatible with
; MS-DOS. Distributed under the GNU GPL.
;
; Revision 1.3 2000/03/09 06:06:38 kernel
; 2017f updates by James Tabor
;
; Revision 1.2 1999/08/10 17:56:26 jprice
; ror4 2011-02 patch
;
; Revision 1.1.1.1 1999/03/29 15:39:35 jprice
; New version without IPL.SYS
;
; Revision 1.3 1999/02/01 01:40:06 jprice
; Clean up
;
; Revision 1.2 1999/01/22 04:17:40 jprice
; Formating
;
; Revision 1.1.1.1 1999/01/20 05:51:01 jprice
; Imported sources
;
;
; Rev 1.0 07 Feb 1998 20:59:16 patv
;Modified stack frame to match DOS standard
; $EndLog$
;
; Standard stack frame used throughout DOS-C
;
; MS-DOS specific
;
; +---------------+
; | irp hi | 26
; +---------------+
; | irp low | 24
; +---------------+
; | flags | 22
; +---------------+
; | cs | 20
; +---------------+
; | ip | 18
; +---------------+
; | es | 16
; +---------------+
; | ds | 14
; +---------------+
; | bp | 12
; +---------------+
; | di | 10
; +---------------+
; | si | 8
; +---------------+
; | dx | 6
; +---------------+
; | cx | 4
; +---------------+
; | bx | 2
; +---------------+
; | ax | 0
; +---------------+
;
;; Note: The order of the pushed registers _must_ match with the definition
;; of the "iregs" structure within PCB.H, because a pointer to the last
;; pushed register is used as a pointer to a "iregs" structure within the
;; called C sources! -- 2000/03/22 ska
; Don't use `struc RegFrame' etc. here because it interferes with segment
; definitions.
reg_ax equ 0
reg_bx equ 2
reg_cx equ 4
reg_dx equ 6
reg_si equ 8
reg_di equ 10
reg_bp equ 12
reg_ds equ 14
reg_es equ 16
reg_ip equ 18
reg_cs equ 20
reg_flags equ 22
irp_low equ 24
irp_hi equ 26
%macro PUSH$ALL 0
push es
push ds
push bp
push di
push si
push dx
push cx
push bx
push ax
%endmacro
%macro POP$ALL 0
pop ax
pop bx
pop cx
pop dx
pop si
pop di
pop bp
pop ds
pop es
%endmacro