•  Back 
  •  Main 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The GFA-Basic Compendium
Author      : GFA Systemtechnik GmbH
Version     : GFABasic.HYP v2.96 (12/9/2021)
Subject     : Documentation/Programming
Nodes       : 897
Index Size  : 27968
HCP-Version : 3
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Document not found
@help       : Help
@options    : +g -i -s +z
@width      : 75
@hostname   : STRNGSRV
@hostname   : CAB     
@hostname   : HIGHWIRE
@hostname   : THING   
View Ref-FileBIOS(n[,x,y,...])
XBIOS(n[,x,y,...])
GEMDOS(n[,x,y,...])

n, x, y: iexp

These functions are used to call BIOS(), XBIOS(), and GEMDOS() routines, in
each case the optional parameter list is passed to the function number n. In
order to be able to pass the parameters in the correct variable size, they can
be prefixed with W: or L:, to denote word (16-bit) and longword (32-bit) sized
values respectively.

The number and meaning of the parameters depends, as does the returned value,
on the system routine being called. (See also Appendix.)

Examples:

    IF GEMDOS(17)
      PRINT "Printer ready"
    ELSE
      PRINT "Printer not ready"
    ENDIF

--> Checks if the printer is ready to receive data through the parallel
    interface and reports the status as a logical (TRUE or FALSE) value.

    REPEAT
    UNTIL BIOS(11,-1) AND 4

--> Waits until the Control key is pressed. BIOS(11,-1) reports on the current
    status of the keyboard 'shift' keys:

    Bit  Key
    0    Right shift
    1    Left shift
    2    Control
    3    Alternate
    4    Caps Lock

    CIRCLE 320,200,180
    PAUSE 30
    BMOVE XBIOS(2),XBIOS(2)+16000,16000

--> Draws a circle and copies its upper half to the lower part of the screen.
    XBIOS(2) returns the address at which the physical screen memory begins.

Memo: GEMDOS() functions that do not exist always return -32.
      XBIOS() functions that do not exist seem to return the opcode.
        This is not very reliable for detecting invalid calls.
      BIOS() functions that do not exist seem to return the opcode.
        This is not very reliable for detecting invalid calls.
        However, under MiNT the return value seems to be -32.

      Internally, the Editor uses d7 to save and restore the stack during
      these system calls. If d7 is altered by a custom trap handler the Editor
      will crash. UNSQUISH.PRG does this with two custom calls. In my opinion
      DC Squish II is to blame here as it breaks the most basic OS rules.
      The compiler however works differently and the same call won't crash.

      Clean way to get Cookie Jar pointer:
        LPEEK(&H5A0) -> BIOS(5,W:SHR&(&H5A0,2),L:TRUE)
        This only works for addresses divisible by 4.

      Undocumented feature: Also allows semi-colons as parameter separators.
        ~GEMDOS(281;W:1)  !pdoamin(1)

BIOS()+, XBIOS()+, GEMDOS()+