Thornton 2 dot Com
1K5C6

GEOS Kernal Routines by Category

Ariel's GEOS Programmer's Reference Guide
Back: GEOS Development (WIP) Up: Contents Next: Device Drivers (TODO)


GEOS Kernal Routines
Back: First Up: Remarks Next: Sorted Alphabetically

Table of Contents

Routines by Category

Icon Routines

Name Purpose Call Address
CBM Apple
DoIcons Draw and activate the icons (buttons) in a table. $c15a $fe0c
Go to Table of Contents.

Menu Routines

Name Purpose Call Address
CBM Apple
DoMenu Display and activate a menu tree. $c151 $fe0f
ReDoMenu Redraw and reactivate the current menu. $c193 $fe12
DoPreviousMenu Erase the current submenu and back up a menu level. $c190 $fe15
GotoFirstMenu Close all open submenu levels. $c1bd $fe18
ReDoMenu Redraw and reactivate the current menu. $c193 $fe12
RecoverMenu Erase the current menu from the screen. $c154 $fe1b
RecoverAllMenus Erase all open menus from the screen. $c157 $fe1e
Go to Table of Contents.

Graphics Routines: Fill Patterns

Name Purpose Call Address
CBM Apple
SetPattern Set the current fill pattern. $c139 $fe36
SetUserPattern Set a user-defined pattern as the current fill pattern. . $ff80
Go to Table of Contents.

Graphics Routines: Pixels

Name Purpose Call Address
CBM Apple
DrawPoint Draw, erase, or recover a pixel. $c133 $fe21
TestPoint Get the value of a pixel on either screen. $c13f $fe24
Go to Table of Contents.

Graphics Routines: Lines

Name Purpose Call Address
CBM Apple
HorizontalLine Draw a horizontal line on the screen. $c118 $fe27
VerticalLine Draw a vertical line on the screen. $c121 $fe2a
InvertLine Invert a horizontal line on the screen. $c11b $fe2d
ImprintLine Copy a horizontal line from screen 1 to screen 2. . $ff8f
RecoverLine Copy a horizontal line from screen 2 to screen 1. $c11e $fe30
DrawLine Draw, erase, or recover a line. $c130 $fe33
CopyLine Copy a horizontal line from one part of either screen to another part. . $ff5f
Go to Table of Contents.

Graphics Routines: Rectangles

Name Purpose Call Address
CBM Apple
Rectangle Fill a box with the current pattern. $c124 $fe39
i_Rectangle Fill a box with the current pattern using inline data. $c19f $fe3c
FrameRectangle Draw the outline of a box in a given pattern. $c127 $fe3f
i_FrameRectangle Draw the outline of a box in a given pattern using inline data. $c1a2 $fe42
InvertRectangle Invert the pixels in a box. $c12a $fe45
ImprintRectangle Copy a box from screen 1 to screen 2. $c250 $fe4e
i_ImprintRectangle Copy a box from screen 1 to screen 2 using inline data. $c253 $fe51
RecoverRectangle Copy a box from screen 2 to screen 1. $c12d $fe48
i_RecoverRectangle Copy a box from screen 2 to screen 1 using inline data. $c1a5 $fe4b
CopyScreenBlock Copy a rectangle from one part of either screen to another part. . $ff5c
Go to Table of Contents.

Graphics Routines: Bitmaps

Name Purpose Call Address
CBM Apple
BitmapUp Draw an encoded bitmap image on the screen. $c142 $fe54
i_BitmapUp Draw an encoded bitmap image on the screen using inline data. $c1ab $fe57
NewBitUp Draw an encoded bitmap image on the screen. . $ff1d
i_NewBitUp Draw an encoded bitmap image on the screen using inline data. . $ff9e
BitmapClip Draw a cropped section of an encoded bitmap image. $c2aa $fe5a
NewBitClip Draw a cropped section of an encoded bitmap image. . $ff95
BitOtherClip Draw a section of a bitmap image using call vectors. $c2c5 $fe5d
NewBitOtherClip Draw a section of a bitmap image using call vectors. . $ff0e
Go to Table of Contents.

Graphics String Routines

Name Purpose Call Address
CBM Apple
GraphicsString Process several graphics commands given in a table. $c136 $fe60
i_GraphicsString Process several graphics commands designated by a table of inline data. $c1a8 $fe63
Go to Table of Contents.

Graphics Memory Routines

Name Purpose Call Address
CBM Apple
GetScanLine Compute the address of a given row on the screen. $c13c $fe66
SetNewMode Change graphics mode to 40-column or 80-column. $c2dd .
NormalizeX Adjust x-coordinate for 80-column mode. $c2e0 .
ReadScanLine Read a full-width line of pixels from screen 1. . $ff98
ReadBackLine Read a full-width line of pixels from screen 2. . $ff74
GetScreenLine Load a line from the screen as it appears in memory. . $ff62
PutScreenLine Save a line to the screen as it appears in memory. . $ff65
CopyFullScreen Copy a full-width part of screen 1 to another part. . $ff92
SaveFG Save a box on screen 1 to data for recovery later. . $03ab
RecoverFG Recover a box on screen 1 from previously saved data. . $03ae
DivideBySeven Divide an unsigned 16-bit number by 7 for direct screen access graphics. . $ff68
Go to Table of Contents.

Graphics Routines: Sprite Routines

Name Purpose Call Address
CBM Apple
DrawSprite Copy a sprite image into the internal storage area. $c1c6 $fea2
PosSprite Position a sprite using GEOS coordinates. $c1cf $fea5
EnablSprite Turn a sprite on. $c1d2 $fea8
DisablSprite Turn a sprite off. $c1d5 $feab
GetSpriteData Copy a sprite image from the internal storage area. . $ff6e
InitSprite Initialize all software sprites. . $ff32
SoftSprHandler Update soft-sprites on the screen. . $ff2c
Go to Table of Contents.

Text Routines: String Display

Name Purpose Call Address
CBM Apple
PutString Display an entire string of text. $c148 $fe69
i_PutString Display an entire string of text using inline data. $c1ae $fe6c
EraseCharacter Erase a text character from the screen. . $ff3e
Go to Table of Contents.

Text Routines: Number Display

Name Purpose Call Address
CBM Apple
PutDecimal Display an unsigned 16-bit integer in decimal. $c184 $fe6f
Go to Table of Contents.

Text Routines: String Input

Name Purpose Call Address
CBM Apple
GetString Input a line of text from the user. $c1ba $fe72
Go to Table of Contents.

Text Routines: Character Input

Name Purpose Call Address
CBM Apple
GetNextChar Get a key from the keyboard queue. $c2a7 $fe75
InitTextPrompt Set sprite 1 as a vertical bar text cursor. $c1c0 $fe78
PromptOn Turn on text cursor. $c29b $fe7b
PromptOff Turn off text cursor. $c29e $fe7e
Go to Table of Contents.

Text Routines: Character Display

Name Purpose Call Address
CBM Apple
PutChar Display a text character on the screen. $c145 $fe81
SmallPutChar Display a text character on the screen without any special processing. $c202 $fe90
Go to Table of Contents.

Text Routines: Fonts and Styles

Name Purpose Call Address
CBM Apple
GetRealSize Return the actual width of a character in the current font. $c1b1 $fe84
GetCharWidth Return the width of a character in the current font. $c1c9 $fe87
LoadCharSet Change the current font. $c1cc $fe8a
LoadAuxSet Change the current font to one in auxiliary RAM. . $ff77
UseSystemFont Reset the current font to the default BSW 9 font. $c14b $fe8d
SaveFontData Save font variables to saveFontTab to restore later. . $ff35
RestoreFontData Restore font variables from saveFontTab saved earlier. . $ff38
SortAlpha Sort a list of 16-byte strings (like filenames) alphabetically. . $03a5
Go to Table of Contents.

Dialog Box Routines

Name Purpose Call Address
CBM Apple
DoDlgBox Show a dialog box window. $c256 $ff17
RstrFrmDialog Close a dialog box window. $c2bf $ff1a
InitForDialog Prepare to show a dialog box. . $ff4a
RecoverSysRam Recover from showing a dialog box. . $ff53
Go to Table of Contents.

Process Routines

Name Purpose Call Address
CBM Apple
InitProcesses Set up a table of recurring processes. $c103 $feae
RestartProcess Enable a recurring timed event, reset its timer. $c106 $feb1
BlockProcess Disable execution of a timed event. $c10c $feb4
UnblockProcess Enable execution of a timed event. $c10f $feb7
FreezeProcess Stop the timer on a timed event. $c112 $feba
UnfreezeProcess Restart the timer on a timed event. $c115 $febd
EnableProcess Force a timed event to execute, regardless of its timer. $c109 $fec3
Go to Table of Contents.

Math Routines

Name Purpose Call Address
CBM Apple
DShiftLeft Shift bits of a word left, multiplying by a power of 2. $c15d $fec6
DShiftRight Shift bits of a word right, dividing by a power of 2. $c262 $fec9
BBMult Multiply two unsigned 8-bit numbers. $c160 $fecc
BMult Multiply two unsigned numbers, a 16-bit by an 8-bit. $c163 $fecf
DMult Multiply two unsigned 16-bit numbers. $c166 $fed2
Ddiv Divide unsigned numbers, a 16-bit by a 16-bit. $c169 $fed5
DSdiv Divide signed numbers, a 16-bit by a 16-bit. $c16c $fed8
Dabs Compute the absolute value of a 16-bit number. $c16f $fedb
Dnegate Negate a signed 16-bit number. $c172 $fede
Ddec Decrement a 16-bit value. $c175 $fee1
GetRandom Compute a new 16-bit pseudorandom number. $c187 $fee4
Go to Table of Contents.

Memory Routines

Name Purpose Call Address
CBM Apple
CopyString Copy a null-terminated string. $c265 $fee7
CopyFString Copy a fixed-length block of memory. $c268 $feea
CmpString Compare two null-terminated strings. $c26b $feed
CmpFString Compare two fixed-length blocks of memory. $c26e $fef0
Panic Draw a system error window and halt the system. $c2c2 $fef3
MoveData Copy memory to a new location. $c17e $fef6
i_MoveData Copy memory to a new location using inline data. $c1b7 $fef9
MoveBData Copy memory in or between front-RAM and back-RAM. $c2e3 .
MoveAuxData Copy memory in or between main and auxiliary RAM. . $ff6b
ClearRam Fill a memory region with zeroes. $c178 $fefc
FillRam Fill a memory region with a byte. $c17b $feff
i_FillRam Fill a memory region with a byte using inline data. $c1b4 $ff02
InitRam Initialize many memory regions using a table of values. $c181 $ff05
StashRAM Copy a block of memory from main RAM into the REU. $c2c8 .
FetchRAM Copy a block of memory from the REU into main RAM. $c2cb .
SwapRAM Swap memory between main RAM and the REU. $c2ce .
SwapBData Swap memory in or between front-RAM and back-RAM. $c2e6 .
SwapMainAndAux Swap memory between main and auxiliary RAM. . $ff71
VerifyRAM Verify a block of memory in main RAM against one in the REU. $c2d1 .
VerifyBData Verify a block of memory in front-RAM or back-RAM against another. $c2e9 .
DoRAMOp Move memory to and from the REU. $c2d4 .
DoBOp Copy, swap, or verify memory between front-RAM and back-RAM. $c2ec .
Go to Table of Contents.

System Routines

Name Purpose Call Address
CBM Apple
Sleep Pause subroutine without halting GEOS. $c199 $fec0
EnterDesktop End application and restart GEOS deskTop. $c22c $ff59
StartAppl Warmstart GEOS and run a program already in memory. $c22f $fe06
RstrAppl End desk accessory and return to calling application. $c23e $0360
CallRoutine Conditional jump to a routine. $c1d8 $ff08
JsrToAux Jump to a routine in auxiliary RAM. . $03b4
DoInlineReturn Return from inline subroutine. $c2a4 $fe09
GetSerialNumber Load this GEOS Kernal's serial code. $c196 $4b38
ToBasic Restart BASIC, optionally with a program to load. $c241 .
FirstInit Initialize GEOS variables and structures to boot-time states. $c271 $ff11
CRC Compute a checksum for a data region. $c20e $ff14
ChangeDiskDevice Change the device number of a drive. $c2bc .
BootGEOS Restart GEOS from BASIC. $c000 .
ResetHandle Internal bootstrap entry point. $c003 .
Bell Sound speaker at 1 KHz for about 100 ms. . $ff86
WarmStart Warmstart GEOS. . $ff4d
Go to Table of Contents.

High-Level Disk Routines

Name Purpose Call Address
CBM Apple
SetDevice Make another device the current disk drive. $c2b0 .
OpenDisk Open a disk to GEOS. $c2a1 $0399
ReOpenDisk Reopen a disk to its most recent directory. . $03a2
GetPtrCurDkNm Compute the address of the disk's name. $c298 $ff56
SetGEOSDisk Convert a non-GEOS CBM disk to GEOS format. $c1ea .
ChkDkGEOS Check if the disk is GEOS format or not. $c1de .
FindFTypes Find all files in the current directory of a specific GEOS type. $c23b $0366
FdFTypesInDir Find all files in a directory not the current directory of a specific GEOS type. . $0363
GetFile Load a GEOS file or load and run a GEOS program. $c208 $030f
FindFile Find a file in the current directory. $c20b $0369
FndFilinDir Find a file in a directory not the current directory. . $036c!
SaveFile Save memory to a new GEOS file. $c1ed $0318
DeleteFile Delete a file from the disk. $c238 $0357
RenameFile Rename a file in the current directory. $c259 $0393
CalcBlksFree Count the number of free blocks on the current disk. $c1db $0324
Go to Table of Contents.

Mid-Level Disk Routines

Name Purpose Call Address
CBM Apple
GetBlock Read a given disk block. $c1e4 $0300!
PutBlock Write and verify a given block to disk. $c1e7 $0303
GetFHdrInfo Load the GEOS header of a file. $c229 $0390
ReadFile Load memory from a chain of blocks on the disk. $c1ff $0315
WriteFile Save memory to a chain of allocated disk blocks. $c1f9 $031b
ReadByte Read a byte from a file. $c2b6 $ff41
GetDirHead Read the directory header from the disk. $c247 $0372
PutDirHead Write directory header to disk. $c24a $037b?
GetOffPageTrSc Get the off-page directory block track and sector. $9036? .
GetVBM Load the disk's first VBM block into the VBM cache. . $031e
PutVBM Flush the VBM cache to the disk's VBM block. . $0321
Get1stDirEntry Get the first file listed in the current directory. $9030 $0396?
GetNxtDirEntry Get the next file listed in the current directory. $9033 $039c?
NewDisk Tell GEOS diskTurbo a new disk is in the drive. $c1e1 .
LdApplic Load and possibly run an application file. $c21d $038d
LdDeskAcc Load and run a desk accessory file. $c217 $035d
LdFile Load a GEOS data file. $c211 $0312
GetFreeDirBlk Find space for a new entry in the current directory. $c1f6 $0375
BlkAlloc Allocate enough sectors for a file. $c1fc $0351
NxtBlkAlloc Allocate more sectors for a file. $c24d $0354
SetNextFree Allocate the next free block on the disk. $c292 $032d
FindBAMBit Check if a disk block is in use. $c2ad .
FreeBlock Mark a disk block as unallocated. $c2b9 $032a
SetGDirEntry Create a directory entry on the disk. $c1f0 $037b?
BldGDirEntry Create a directory entry in memory. $c1f3 $036f
FollowChain Create a table of disk blocks used by a file. $c205 .
FastDelFile Delete a sequential file quickly. $c244 .
FreeFile Mark a file's disk blocks as unallocated. $c226 $035a
FreeDir Mark a subdirectory's disk blocks as unallocated. . $03ba
DeleteDir Delete a subdirectory from the disk's current directory. . $037e
MakeSubDir Create a subdirectory in the disk's current directory. . $0387
GetPathname Get the full pathname of a directory. . $0384
Go to Table of Contents.

Primitive Disk Routines

Name Purpose Call Address
CBM Apple
InitForIO Open serial communication. $c25c .
DoneWithIO Close serial communication. $c25f .
PurgeTurbo Remove GEOS diskTurbo from current drive. $c235 .
EnterTurbo Enable GEOS diskTurbo in the current disk drive, uploading it if necessary. $c214 .
ExitTurbo Disable GEOS diskTurbo in the current disk drive. $c232 .
ReadBlock Read a given disk block (without overhead). $c21a .
WriteBlock Write a block to disk. $c220 .
VerWriteBlock Verify a block recently written to disk. $c223 .
ReadLink Read the link from a disk block to the next block. $904b .
DownDirectory Make a subdirectory the new current directory. . $0381
UpDirectory Make parent directory the new current directory. . $038a
GoDirectory Change the current directory to another directory. . $039f
UpdateParent Update current and parent directory headers. . $03b7
SetLdVars Transfer GEOS pseudoregisters to Ld variables. . $ff47
GetLdVars Transfer Ld variables to GEOS pseudoregisters. . $ff44
Go to Table of Contents.

VLIR Routines

Name Purpose Call Address
CBM Apple
OpenRecordFile Open a VLIR file. $c274 $033f
CloseRecordFile Close the open VLIR file. $c277 $0333
UpdateRecordFile Update a VLIR file. $c295 $034b
PreviousRecord Make previous record current in VLIR file. $c27d $0345
NextRecord Make next record current in VLIR file. $c27a $0336?
PointRecord Make a specific record current in VLIR file. $c280 $0342
InsertRecord Insert a new record before current record in VLIR file. $c286 $0339
AppendRecord Append a new record after current record in VLIR file. $c289 $0330
DeleteRecord Delete the current VLIR record. $c283 $0336?
WriteRecord Save memory to current record of VLIR file. $c28f $034e
ReadRecord Read current record from VLIR file. $c28c $0348
Go to Table of Contents.

Input Driver Routines

Name Purpose Call Address
CBM Apple
InitMouse Input driver: Initialize pointer device. $fe80 $f000
SlowMouse Input driver: Stop and reset pointer acceleration. $fe83 $f003
UpdateMouse Input driver: Update mouse variables from device. $fe86 $f006
StartMouseMode Initialize and start monitoring the mouse. $c14e $fe93
MouseOff Turn off the mouse pointer. $c18d $fe96
MouseUp Turn on the mouse pointer. $c18a $fe99
IsMseInRegion Check if the mouse pointer is in a box. $c2b3 $fe9c
TempHideMouse Temporarily hide all soft-sprites including pointer. $c2d7 $ff29
HideOnlyMouse Temporarily hide the soft-sprite mouse pointer. $c2f2 $ff7a
SetMsePic Load and preshift a new soft-sprite pointer icon. $c2da $ff2f
ClearMouseMode Stop monitoring the pointer. $c19c $fe9f
Go to Table of Contents.

Printer Driver Routines

Name Purpose Call Address
CBM Apple
InitForPrint Printer driver: Initialize printer for a new document. $7900 $6000
GetDimensions Printer driver: Get dimensions of a printed page. $790c .
GetMode Printer driver: Get dimensions of a printed page and print modes. . $6012
SetMode Printer driver: Set print mode. . $6015
StartPrint Printer driver: Set printer for graphics printing. $7903 $6003
PrintBuffer Printer driver: Print an 8 pixel high row of graphics. $7906 $6009
StopPrint Printer driver: Flush buffer and feed in next page. $7909 $600f
StartASCII Printer driver: Set printer for ASCII text printing. $7912 $6006
SetNLQ Printer driver: Set ASCII mode to Near-Letter Quality. $7915 .
PrintASCII Printer driver: Print a string of ASCII text. $790f $600c
CancelPrint Printer driver: Stop printer immediately, clear printer and I/O card buffers. . $6018
Go to Table of Contents.

Card Driver Routines

Name Purpose Call Address
CBM Apple
InitCard Card driver: Initialize printer card. . $6700
InfoCard Card driver: Get printer attributes. . $670f
StatusCard Card driver: Get current I/O status. . $6712
InputByte Card driver: Read a byte from I/O card. . $6709
OutputByte Card driver: Write a byte to I/O card. . $6706
ClearCard Card driver: Stop transmitting and clear its buffer. . $6715
OpenCard Card driver: Open printer card for access. . $6703
CloseCard Card driver: Close I/O card access. . $670c
Go to Table of Contents.

Clock Driver Routines

Name Purpose Call Address
CBM Apple
ReadClock Clock driver: Update GEOS clock from hardware. . $0800
ClockInt Clock driver: Interrupt level routine. . $0803
SetAlarm Clock driver: Enable the alarm, set alarm time. . $0809
ResetAlarm Clock driver: Disable the alarm. . $080c
SetTimeDate Clock driver: Set the hardware clock's time. . $0806
Go to Table of Contents.

Aux Driver Routines

Name Purpose Call Address
CBM Apple
AuxDMain Aux driver: Main loop routine. . $efa0
AuxDInt Aux driver: Interrupt level routine. . $efa3
AuxDKeyFilter Aux driver: Filter current keypress. . $efa6
AuxDExit Aux driver: Uninstall and exit. . $efa9
Go to Table of Contents.