Macro AbsJmp dest,tmp
	ifb <tmp>
	  push (offset dest)	; 5,  2  , 1
	  retn			; 1, 10+m, 5
	elif <>
	  push (offset dest)
	  retn
	else
	  mov tmp,(offset dest) ; 5,  2  , 1
	  jmp tmp		; 2,  7+m, 5
	endif
EndM  AbsJmp
Macro AbsLngJmp dest
	push (seg dest)
	push (offset dest)
	retf
EndM  AbsLngJmp

Macro	ACall dest,align?
	ifnb <align?>
	  AlignP 4,2
	endif
	ds:
	mov eax,offset dest
	call eax
EndM	ACall

Macro	


Struc AerialThread	_bx,_si,_di,_bp,_sp,eesp,resp ; Lighter than Light !
  AT_SAVE_EBX		dd	?	; initial Top of Stack
  AT_SAVE_ESI		dd	?	; Data Stack Pointer
  AT_SAVE_EDI		dd	?	; Return Stack Pointer
  AT_SAVE_EBP		dd	?	; Those two are reserved for the
  AT_SAVE_ESP		dd	?	;; threading mechanism.
  AT_SAVE_RESP		dd	?	; ESP save when going ret-threaded
  AT_STATE		dd	?	; flags used for thread sync'
  AT_MAX_ESI		dd	?	; bottom of data stack
  AT_MAX_EDI		dd	?	; bottom of return stack
  AT_LINKBACK		dd	?	; link back to thread object
EndS  AerialThread

; parameter is the address of a character*attribute virtual array.

Struc VirtualArray
param	dd	?	; parameter
width	dd	?	; number of columns
height	dd	?	; number of lines
get	dd	?	; get char & attribute  ( va x y -- ch attr )
put	dd	?	; set char & attribute  ( va x y ch attr -- )
EndS  VirtualArray

