NEC CP/M-86 System Reference Manual page 177

Advanced personal computer
Table of Contents

Advertisement

CGroup
Driver_Code
Group
Driver_Code
CSeg
Public Driver
Driver: Mov
Ax, Sp
Mov
Bx, Ss
; Save caller's stack pointers
; Note that Mov Ss, xxx Mov Sp, xxx is not interruptable on 8086.
Mov
Ss, Stack Base
; Switch to driver's stack
Mov
Sp, Offset Top_Stack
Push
Bx
; Push caller's stack pointer
Push
Ax
Push
Bp
; Save caller's frame
Push
Ds
; Save parameter pointer
Push
Dx
Pushf
; Save caller's direction flag
; Invoke the driver. Ds:Dx points to the parameter block. It returns with
; a Retf.
CalIf
Popf
Pop
Pop
Pop
Pop
Pop
Mov
Mov
Retf
DcLDriver
Dx
Ds
Bp
Ax
Bx
Ss, Bx
Sp, Ax
Stack Base
Dw
Seg Top _ Stack
DcLDriver_Code CSeg
; Invoke the driver with Ds:Dx
; Restore caller's direction flag
; Restore caller's Ds:Dx
; Restore caller's stack frame
; Restore caller's Ss:Sp
; via
; Bx
; and Ax
Extrn
DcLDriver
:Far
Stack
SSeg
Rs
16
; This module pushes 8 words
; Top_Stack is defined in the last module linked in.
Extrn
Top_Stack
:Byte
End
GSX-86: Graphics for the APe
9-45

Advertisement

Table of Contents
loading

Table of Contents