Performs an interrupt function call. ──────────────────────────────────────────────────────────────────────────────
Syntax
ret := GT_INT86(<intno>,@<AX>,@<BX>,@<CX>,@<DX>,@<SI>,@<DI>, @<BP>,@<DS>,@<ES>)
Arguments:
<intno> - Interrupt Function number to call (33dec = int 21h) <AX> - Input register value of AX - PASSED BY REFERENCE <BX> - Input register value of BX - PASSED BY REFERENCE <CX> - Input register value of CX - PASSED BY REFERENCE <DX> - Input register value of DX - PASSED BY REFERENCE <SI> - Input register value of SI - PASSED BY REFERENCE <DI> - Input register value of DI - PASSED BY REFERENCE <BP> - Input register value of BP - PASSED BY REFERENCE <DS> - Input register value of DS - PASSED BY REFERENCE <ES> - Input register value of ES - PASSED BY REFERENCE
Returns:
<ret> - The value of carry flag! <AX> - Output register value of AX <BX> - Output register value of BX <CX> - Output register value of CX <DX> - Output register value of DX <SI> - Output register value of SI <DI> - Output register value of DI <BP> - Output register value of BP <DS> - Output register value of DS <ES> - Output register value of ES
Description:
This little <grin> function allows your Clipper application to make use of dos functions and interrupts, such as scrolling screens, direct disk access, video bios calls, etc.
It works by setting up Register Variables in your Clipper program and passing them in to GT_INT86() by REFERENCE; this is important if you want to see what the outcome of those registers are on return from the dos function. Although, this will still work if you do not pass by reference - you obviosly will not be returned any of the outgoing register values.
In addition to updating the registers, it will return the carry flag to the calling process. If 0 is returned by the function then the carry flag was not set after performing your dos function. If 1 is returned then the carry flag was set (usually indicating an error).
local s := "Hello World$" local rax := 0 local rbx := 0 local rcx := 0 local rdx := 0 local rsi := 0 local rdi := 0 local rbp := 0 local rds := 0 local res := 0 local inter := 0 local ret := 0
ret := gt_int86(33, rax, rbx, rcx, rdx, rsi, rdi, rbp, rds, res) /* The above line Displays Hello World */
* The following will get the current date rax := makehi(42) inter := 33 ret := gt_int86(33,@rax,@rbx,@rcx,@rdx,@rsi,@rdi,@rbp,@rds,@res)
* Returns AL = DOW, CX = Year, DH = Month, DL = Day ? "it's the "+str(lowbyte(rax))+" Day of the Week" ? "The Date Is : " ?? lowbyte(rdx) ?? "/" ?? highbyte(rdx) ?? "/" ?? rcx ? ? "Return : "+str(ret)