Sorted by file | Sorted alphabetically | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Name | ActiveLock | (baos.asm) | |
---|---|---|---|
Input | A | lock | |
Output | HL | Current lock value | |
Description | Checks whether a lock is active by returning the current lock value | ||
|
|||
Name | ActiveMultiLock | (baos.asm) | |
Input | A | lock | |
Input | B | locksize | |
Output | HL | $00 when free, PID of first process that was found otherwise | |
Description | Used to check whether any process has obtained a multi-process lock. | ||
|
|||
Name | BackUpRom | (baos.asm) | |
Input | HL | Block to move (in normal Flash-driver format, see also the OS Documentation page). | |
Output | HL | $FFFF on Failure, $0000 on success. | |
Description | Used internally for sector cleaning (removing "dead" blocks). Copies (physically) a file to another sector or to the swap sector (sector 6). Deletes ("kills") the source afterward. WARNING: You should have cleaned the swap-page before calling this function. | ||
|
|||
Name | Basename | (baos.asm) | |
Input | HL | A full path | |
Output | HL | Pointer to the start of the filename in the given string. | |
Description | Strips a filename from a complete path (i.e. "file" from "/a/directory/with/a/file") | ||
|
|||
Name | Blk2Byte | (baos.asm) | |
Input | HL | Block-address | |
Output | HL | Pointer to the first byte of that block. | |
Description | This function takes a flash block-address (in [rom-page][blocknr] format), switches to the corresponding flash-page and returns a pointer to the first byte of that block. | ||
|
|||
Name | Byte2Blk | (baos.asm) | |
Input | HL | Logical address ($4000 to $7FFF). | |
Output | HL | Block number | |
Description | Calculates the Flash-driver block number from a exact address (and the current flash page). | ||
|
|||
Name | ByteRDY | (baos.asm) | |
Input | A | Value that is written | |
Input | DE | Byte that is written | |
Output | HL | $0000 on success, $FFFF on failure. | |
Description | Waits until byte DE of the current flash page is ready writing value A to itself. | ||
|
|||
Name | Calloc | (baos.asm) | |
Input | HL | Bytes needed | |
Output | HL | Pointer to memory at succes, zero at failure. | |
Description | Called does the same as Malloc, but will initialize the memory with zeros. | ||
|
|||
Name | CleanSec | (baos.asm) | |
Input | A | Sector to clean. | |
Output | HL | $FFFF on Failure, $0000 on success. | |
Description | Cleans a single sector from "dead" blocks, to get some free space. | ||
|
|||
Name | ClearSwap | (baos.asm) | |
Output | HL | $0000 on success, $FFFF on failure, | |
Description | Checks if there is any data in the swap-sector. If that is the case, the swap space will be wiped out. | ||
|
|||
Name | ClrSec | (baos.asm) | |
Input | B | Sector to Erease | |
Output | HL | Zero on success, $FFFF on failure. | |
Description |
Ereases one flash sector to $FF. However, important sectors are protected. If you put a zero into the variable flashprotmode , only sector 7 is not ereasable.
|
||
|
|||
Name | Cls | (baos.asm) | |
Output | HL | Garbage | |
Description | Clears the virtual screen of this process. | ||
|
|||
Name | Cls_hw | (baos.asm) | |
Description | Clears the LCD screen by hardware. You probably want to use Cls instead. | ||
|
|||
Name | CntDeadBlks | (baos.asm) | |
Input | A | Sector to scan. | |
Output | HL | Number of dead blocks. | |
Description | Counts the number of dead blocks in the given sector. Used by TryCleanSec. | ||
|
|||
Name | CopyBlk | (baos.asm) | |
Input | DE | Pointer to 64 previous allocated bytes in the RAM. | |
Input | HL | Pointer to the first byte ot the FLASH block to copy ($4000 to $7fc0). | |
Output | HL | End of data in FLASH. | |
Description | Copies one block (64 bytes) from the flash to a specified place in the RAM. | ||
|
|||
Name | CopyToRam | (baos.asm) | |
Input | BC | Amount of bytes to copy. | |
Input | HL | Pointer to the source ($4000 to $7FFF). | |
Output | HL | $FFFF on failure, otherwise a pointer to the start of your data in the RAM. | |
Description | Copies data from the flash to the RAM. | ||
|
|||
Name | EndProc | (baos.asm) | |
Description | This function terminates the process instandly and cleans up the system (freeing memory, clean op process table). After this it switches to the next process. | ||
|
|||
Name | ExecFile | (baos.asm) | |
Input | HL | Path to the program. | |
Output | HL | $FFFD if the file couldn't be found, $FFFE if the file isn't executable, $FFFF if an other error occurs. Depends on the program on success. | |
Description | Loads a file from the filesystem into the memory and starts executing that file. The loaded program will take over control. If the program exits in a normal way, execution will be resumed. See also StartFile. | ||
|
|||
Name | Falloc | (baos.asm) | |
Input | B | Amount of needed blocks (1 block = 64 bytes). | |
Output | HL | $FFFF on failure, otherwise the first block of your empty space. | |
Description | Searches for an empty place in the flash. A wrapper around SeekEmpty and TryCleanSec, to provide automatic sector cleaning. | ||
|
|||
Name | FindFile | (baos.asm) | |
Input | DE | Filename (full or relative path is also possible). | |
Input | HL | 7 Byte buffer to store file information | |
Output | HL | Pointer to the file information structure on success, $FFFF if the file couldn't be found, $FFFE if there was a problem resolving the path. | |
Description |
Tries to find a file in the filesystem and stores the obtained information in a structure, in a memory buffer given by HL. The structure has the following layout: Byte 1-2: Pointer to file's data in flash Byte 3-4: Pointer to file's filesystem header in flash Byte 5-6: Length of the file, Byte 7: Flags NOTE: This is a low-level filesystem function and you should obtain a lock with GetFlashReadLock first. NOTE: For compatibility reasons, the first byte of the structure will contain the Directory IDentifier (DID) of the file's directory, when the actual file could not be found (which means HL equals $FFFF). |
||
|
|||
Name | FindParentDir | (baos.asm) | |
Description | Returns the parent directory of a specified directory. | ||
|
|||
Name | FindSym | (baos.asm) | |
Input | B | Directory IDentifier of the file's directory. | |
Input | DE | Name of the file. | |
Input | HL | 7 Byte buffer to store file information | |
Output | HL | Pointer to the file information structure on success, $FFFF if the file couldn't be found. | |
Description |
Tries to lookup an entry in the flash memory and stores the obtained information in a structure, in a memory buffer given by HL. To lookup a file in the filesystem (using a file path), use GetFileInfo or FindFile The structure has the following layout: Byte 1-2: Pointer to file's data in flash Byte 3-4: Pointer to file's filesystem header in flash Byte 5-6: Length of the file Byte 7: Flags NOTE: This is a low-level filesystem function and you should obtain a lock with GetFlashReadLock first. |
||
|
|||
Name | Free | (baos.asm) | |
Input | HL | Pointer to previous allocated memory | |
Output | HL | Zero on succes, $FFFF on failure. | |
Description | Frees memory that was allocated by this process (using Malloc, Calloc or PgMalloc. If it was not allocated by this process, HL will be $FFFF. | ||
|
|||
Name | FreeFlashReadLock | (baos.asm) | |
Description | Used to free a direct flash I/O read lock | ||
|
|||
Name | FreeFlashWriteLock | (baos.asm) | |
Output | HL | Zero on success, PID of actual locker on failure. | |
Description | Used to free a flash write lock | ||
|
|||
Name | FreeFlashWriteRecLock | (baos.asm) | |
Description | Frees a lock obtained by GetFlashWriteRecLock or GetFlashWriteRecLock_wait | ||
|
|||
Name | FreeLock | (baos.asm) | |
Input | A | Position of lock | |
Output | HL | Zero on success, PID of actual locker on failure. | |
Description | Used to release a lock created by GetLock. | ||
|
|||
Name | FreeMultiLock | (baos.asm) | |
Input | A | lock | |
Input | B | locksize | |
Output | HL | $0000 on success, $FFFF when no lock was found | |
Description | Used to remove a process from a multiple process lock | ||
|
|||
Name | FreeScrnLock | (baos.asm) | |
Description | Is called by all functions that communicate with the LCD display, to release the lock on the screen. After this functions is called, any process will be able to communicate with the LCD screen again. Only needed by the LCD-driver functions. | ||
|
|||
Name | FreeScrnMasterLock | (baos.asm) | |
Output | HL | 0 on success, otherwise PID of process that actually owns the screen | |
Description | When this function is called, the previous "master-of-screen"-lock (previous got by the GetScrnMasterLock function) will be released so any process will be able to use the LCD display again. Usefull when designing games so the screen-manager will not interfere. | ||
|
|||
Name | Getc | (baos.asm) | |
Output | HL | ASCII code of the key that was pressed. | |
Description | This function waits for a user to press a key (while on the correct virtual screen ofcourse) and returns the ASCII code for this key. The ASCII-code is not returned before the key is released! This functions also prints the key on the screen to let the user know he/she pressed the key. | ||
|
|||
Name | GetFileInfo | (baos.asm) | |
Input | DE | Filename (full or relative path is also possible). | |
Input | HL | Pointer to 3 free bytes of memory | |
Output | HL | Pointer to the same memory buffer, countaining a structure with the file information, on success, or $FFFF if the file couldn't be found, or $FFFE if there was a problem resolving the path. | |
Description |
Obtains information about the given file, which is stored in the 3 byte buffer given by HL. The structure has the following layout: Byte 1-2: Lenght of the file in bytes. Byte 3: The file's FileSystem flags. |
||
|
|||
Name | GetFlashReadLock | (baos.asm) | |
Output | HL | $0000 on success, $0001 when lock was already aquired, $FFFF on failure | |
Description | Used to obtain a direct flash I/O read lock | ||
|
|||
Name | GetFlashReadLock_wait | (baos.asm) | |
Description | Used to obtain a direct flash I/O read lock, waits until lock position is free | ||
|
|||
Name | GetFlashWriteLock | (baos.asm) | |
Output | HL | $00 on success, first blocker PID found on failure | |
Description | Used to obtain a flash write lock | ||
|
|||
Name | GetFlashWriteLock_wait | (baos.asm) | |
Description | Used to obtain a flash write lock - waits for the lock until it's free | ||
|
|||
Name | GetFlashWriteRecLock_wait | (baos.asm) | |
Description | Get a recursive flash write lock, this kind of lock can be obtained and freed multiple times. For every lock you obtain you have to free one. This function will wait until a lock is obtained. | ||
|
|||
Name | GetKey | (baos.asm) | |
Output | HL | ASCII code of the key that was pressed. | |
Description | Same as Getc, but doesn't filter out control characters (in the case of BAOS, everything > ASCII 127). | ||
|
|||
Name | GetLock | (baos.asm) | |
Input | A | Lock to set | |
Output | HL | Zero on success, blocker PID on failure. | |
Description | Tries to set a system lock | ||
|
|||
Name | GetLock_wait | (baos.asm) | |
Input | A | lock | |
Description | Waits until the caller process has a lock on the lock specified in A | ||
|
|||
Name | GetMultiLock | (baos.asm) | |
Input | HL | lock to obtain | |
Output | A | Zero on success, $01 when to process already had the lock, $FF on failure | |
Output | HL | Garbage | |
Description | Tries to obtain a lock on multi-process lock HL. | ||
|
|||
Name | GetPid | (baos.asm) | |
Output | HL | PID of the current process | |
Description | Obtains the PID (Process IDentifier of the current process) | ||
|
|||
Name | GetPidInfo | (baos.asm) | |
Input | A | Pid of the process to obtain information of | |
Input | HL | Pointer to 11-byte memory space. | |
Output | HL | Same as input on success, $FFFF on failure. | |
Description |
This function obtains process information of the process with the specified PID. If no process with the specified PID exists, the function will fail and HL will be $FFFF. On succes, the memory will be filled with the following structure: Byte 1-2: Pointer to the name of the process. Byte 3: Process Status. Byte 4: Process' Virtual Screen. Byte 5: Process' Directory. Byte 6: Process' Flash-page. Byte 7-8: Process' Stack Pointer. Byte 9-10: Process' Program Counter. Byte 11: Process' Process table entry. |
||
|
|||
Name | Gets | (baos.asm) | |
Input | BC | Maximal number of characters to recieve. | |
Input | HL | Pointer to the momery the characters should be stored. | |
Output | HL | Pointer to the end of the string (trailing zero) | |
Description |
This function saves a series of ASCII-codes given by the keypad into a specified location inside the memory. This happends until the user presses the ENTER key or the user is trying to enter more characters than the integer stored in BC. The character-string will be automatically closed with a trailing zero ('\0') character. The characters are also printed to the display when they are read. NOTE: you may never put the number of allocated bytes into BC, since the trailing zero ('\0') byte will exceed this value by one. You can use the number of allocated bytes minus one as BC at max. NOTE2: This function is still under development, special "control characters" (as backspaces, arrows, delete, etc.) are not yet implemented. |
||
|
|||
Name | GetScrnLoc | (baos.asm) | |
Output | HL | Current Screen cursor location. | |
Description | This function puts the location of the cursor into DE (D = row, E = column), the left-upper corner is DE = $0000. | ||
|
|||
Name | GetScrnLocEntry | (baos.asm) | |
Output | HL | Pointer the the current screen location. | |
Description | This function checks the current virtual screen and calculates a pointer to the current cursor location on that screen. It is internally called by GetScrnLoc. | ||
|
|||
Name | GetScrnLock_wait | (baos.asm) | |
Description | This function is called by every function that communicated with the LCD display. It sets a special byte to lock other communication to the LCD driver until the caller function is done. This is automatically done, so you shouldn't need it. To get a full lock on the LCD driver, you should use GetScrnMasterLock, however you should only use this in for example games, since all normal communication is done by the screenmanager. | ||
|
|||
Name | GetScrnLocPtr | (baos.asm) | |
Output | HL | Pointer to memory location of the character belonging to the cursor of this virtual screen. | |
Description | This function returns the location in the memory where the next character printed on this virtual screen will be stored. | ||
|
|||
Name | GetScrnMasterLock | (baos.asm) | |
Output | HL | 0 on succes, on failure the PID from the process that owns the screen. | |
Description | Used to get full access over the LCD display. When a process is the master of screen, there is no other process that may lock to screen to write to it. This means no process can write to the LCD display until it is released by FreeScrnMasterLock. Since to OS should handle all data to the LCD display (using virtual screens), this function should only to be used by the OS. | ||
|
|||
Name | Halt | (baos.asm) | |
Description | Halts forever, only usefull to stop the OS (which can only be done when the OS itself calls halt), when something critical happends. | ||
|
|||
Name | HasFlashLock | (baos.asm) | |
Output | HL | 1 of allowed, 0 if not | |
Description | Check if the current process is allowed to do direct flash I/O | ||
|
|||
Name | HasMultiLock | (baos.asm) | |
Input | A | Lock to check | |
Input | B | size of lock | |
Output | HL | $0000 when lock was aquired, $ffff otherwise | |
Description | Used to check whether the current process has obtained a certain multi-process lock | ||
|
|||
Name | InKey | (baos.asm) | |
Output | HL | ASCII value of pressed key (or zero when no key was pressed) | |
Description | This function return the ascii code of the key currently pressed on the keypad, or a zero if no key was pressed. Special keys will return a non-printable character between 128 and 255. All characters above 127 are not conform ascii. | ||
|
|||
Name | KillBlk | (baos.asm) | |
Input | HL | The block to 'kill' (in [page][blknr] format). | |
Output | HL | $FFFF on failure, $80xx on success. | |
Description | Flag the given block as dead | ||
|
|||
Name | Load | (baos.asm) | |
Input | BC | Location to a 3 byte buffer to store file information in, or $0000 to not store file information. | |
Input | DE | Pointer to a place in the RAM to load the file to (or $0000 to let the function allocate memory). | |
Input | HL | Path to the file to load. | |
Output | HL | Start of the file in the RAM on success, $FFFF or $FFFE on failure (see also FindFile). | |
Description |
Loads a file from the flash to the RAM (for editing and reading purposes). In case BC is not $0000, the following structure will be stored in the memory buffer: Byte 1-2: Lenght of the file in bytes. Byte 3: The file's FileSystem flags. |
||
|
|||
Name | LoadPgm | (baos.asm) | |
Input | HL | Pointer to start of program. | |
Output | HL | Depending on the program, $FFFF can indicate loading was unsuccessfull. | |
Description |
Load and starts a program, waits until it's finished and continues executing. NOTE: if the program loaded calls EndProc, then the programm that was calling LoadPgm will also die. NOTE: You should have a lock on the flash before calling this function! The lock will be freed by this function. |
||
|
|||
Name | Locate | (baos.asm) | |
Input | D | Row (starting at 0) | |
Input | E | Column (starting at 0) | |
Description | Sets the location where the next character will be printed on the screen. Same as Locate_hw, but used with virtual screens. | ||
|
|||
Name | Locate_hw | (baos.asm) | |
Input | D | Row (starting at 0) | |
Input | E | Column (starting at 0) | |
Description | Description locate is used by the screen-manager the set the position of the next character that will be written to the LCD display. Because of the screen manager, you should use Locate instead. | ||
|
|||
Name | LockPtr | (baos.asm) | |
Input | A | lock | |
Output | HL | Position of lock. | |
Description | Returns a pointer to a certain lock variable in memory. | ||
|
|||
Name | Malloc | (baos.asm) | |
Input | HL | Bytes needed | |
Output | HL | Pointer to memory at succes, zero at failure. | |
Description | Malloc can be called by any process that needs some (more) memory. It returns a pointer to a bit of free memory that will only be used by the process that allocated it. After the process is done using it, it should call Free with the same pointer. | ||
|
|||
Name | MkDir | (baos.asm) | |
Input | D | Directory IDentity of the parent directory (the directory the new one will reside in). | |
Input | HL | The name of the new directory. | |
Output | HL | $0000 on success, $FFFF on failure. | |
Description | Creates a new directory. | ||
|
|||
Name | MkFile | (baos.asm) | |
Input | BC | The length of the file (in bytes). | |
Input | D | Directory IDentity of the parent directory (directory the file should be placed in). | |
Input | E | The flags of the file. | |
Input | HL | The name of the file (Should reside in the RAM!!). | |
Input | IX | A pointer to the file's data (Also somewhere in the RAM!!). | |
Output | HL | $0000 on success, $FFFF on failure. | |
Description | Creates a new file. | ||
|
|||
Name | MvRom | (baos.asm) | |
Input | DE | First block of some free space in the flash (the destination). | |
Input | HL | First block of the source. | |
Output | HL | $FFFF on Failure, something else on success. | |
Description | Copies a file (only phisically) from one place in the FLASH to another. Deletes ("kills") the source afterward. | ||
|
|||
Name | NewLine | (baos.asm) | |
Output | HL | Garbage | |
Description | NewLine scrolls down one line, and sets the location of the next character to print on the first column of the current screen (like the ENTER key does in a word-processor). It gives the same result as printing the ASCII character 10 (decimal), a.k.a. '\n'. (Note that in DOS/Windows ASCII character 13 is used in text-files and ASCII character 10 in binary files). | ||
|
|||
Name | NewProc | (baos.asm) | |
Input | HL | Pointer to start address of process | |
Output | HL | PID of the child on success | |
Description | This function starts a new process (which is very different from starting a program, see the OS Documentation page) and returns the the place it was called from. | ||
|
|||
Name | NewProcEx | (baos.asm) | |
Input | A | State of the new process (0 = sleeping, 1 = running) | |
Input | B | Directory of the process | |
Input | C | Virtual screen to start on. | |
Input | DE | Pointer to the name of the new process (string) | |
Input | HL | Pointer to start address of process | |
Output | HL | PID of the child on success | |
Description | Same as newproc, but with more options. | ||
|
|||
Name | NewTimer | (baos.asm) | |
Input | B | Countdown time (measured in interrupts, 140 = ~ 1 sec). | |
Input | C | Repeat-countdown, after the first time the timer is triggered, every C interrupts, the timer will be triggered again (use 0 ('zero') for no repeat). | |
Input | DE | Pointer to the function that should be called by the timer. | |
Output | HL | Zero on success, $FFFF on failure. | |
Description | This function sets up a timer for a scheduled execution of a function. This is internally used for the Sleep function, multitasking and cursor blinking. It can be used for practicly anything that needs timer interrupts. | ||
|
|||
Name | NextBlk | (baos.asm) | |
Input | HL | Pointer to the current file header ($4000 to $7fc0) | |
Output | HL | Logical address of next file header on this page ($4000 to $7fc0) or $FFFF if no header could be found on the current page. | |
Description | Used internally to find the location of the next "file-header" on the current flash page. | ||
|
|||
Name | NextProc | (baos.asm) | |
Description | Let the process manager make a switch to the next process. | ||
|
|||
Name | Page2Page | (baos.asm) | |
Input | A | Destination page. | |
Input | B | Source page. | |
Output | HL | Garbage. | |
Description | Copies a full page to another. Stops copying when an empty block is found. Used by the ClrSec routine. | ||
|
|||
Name | PgMalloc | (baos.asm) | |
Input | HL | Bytes needed | |
Output | HL | Pointer to memory at succes, zero at failure. | |
Description | Same as Malloc, but returns returns only pointers to memory that is executable. | ||
|
|||
Name | PidFromProcEntry | (baos.asm) | |
Input | A | Table entry number. | |
Output | HL | PID | |
Description | Translates a Process Table entry number to a PID value. | ||
|
|||
Name | Printf | (baos.asm) | |
Input | A | Type of data. num , hex , str and char are predefined integers to use. |
|
Input | DE | Data (16-bit integer, pointer to a string or (only E) character) | |
Output | HL | Garbage | |
Description | Prints a character, integer or string (depending on input) to the screen. | ||
|
|||
Name | PrintfAt | (baos.asm) | |
Input | A | Type of data. num, hex, str and char are predefined integers to use. | |
Input | DE | Position to print to. | |
Input | HL | Data (16-bit integer, pointer to a string or (only E) character) | |
Output | HL | Garbage | |
Description | Same as Printf, but prints at a specified location. | ||
|
|||
Name | Putc | (baos.asm) | |
Input | A | Character to print | |
Output | HL | Garbage | |
Description | Print a single character the the screen. | ||
|
|||
Name | Putc_hw | (baos.asm) | |
Input | A | Character to display. | |
Output | HL | Garbage | |
Description | Prints a singe character to the LCD display. Under normal circumstances you should use Putc instead. | ||
|
|||
Name | PutHL | (baos.asm) | |
Input | HL | 16-bit integer | |
Output | HL | Garbage | |
Description | Prints a 16-bit unsigned integer to the screen (in decimal format). | ||
|
|||
Name | PutHLHex | (baos.asm) | |
Input | HL | 16-bit integer | |
Output | HL | Garbage | |
Description | Prints a 16-bit unsigned integer to the screen in hexadecimal format. | ||
|
|||
Name | Puts | (baos.asm) | |
Input | HL | Pointer to a string | |
Output | HL | Garbage | |
Description | Prints a text string to the screen. | ||
|
|||
Name | Puts_hw | (baos.asm) | |
Input | HL | Pointer to a string. | |
Output | HL | Garbage | |
Description | Prints a text-string to the LCD display, under normal circumstances you should use Puts instead. | ||
|
|||
Name | ReadBlk | (baos.asm) | |
Input | DE | Pointer to 64 previous allocated bytes in the RAM. | |
Input | HL | Block to copy (in [page][blknr] format, see OS Documentation page). | |
Output | HL | End of data in FLASH. | |
Description | Copies one block (64 bytes) from the flash to a specified place in the RAM. | ||
|
|||
Name | RemoveBackN | (baos.asm) | |
Input | HL | A string. | |
Output | HL | Location of the '\0' (previously '\n') character. | |
Description |
Changes the first '\n' character in a string to an end-of-string character ('\0'). NOTE: make sure there is actually a '\n' character in the string ! |
||
|
|||
Name | Rom2Rom | (baos.asm) | |
Input | DE | First block of some free space in the flash (the destination). | |
Input | HL | First block of the source. | |
Output | HL | $FFFF on Failure, $0000 on success. | |
Description | Copies a file (only phisically) from one place in the FLASH to another. | ||
|
|||
Name | SeekEmpty | (baos.asm) | |
Input | A | (optional, zero to disable) sector to skip, normally sectors 1-4 will be searched. | |
Input | B | Amount of needed blocks (1 block = 64 bytes). | |
Output | HL | $FFFF on failure, otherwise the first block of your empty space. | |
Description | Searches for an empty place in the flash. | ||
|
|||
Name | SeekNewDirID | (baos.asm) | |
Output | HL | New DID on success, $FFFF on failure. | |
Description | Tries to find a Directory IDentifier that is not already in use. | ||
|
|||
Name | SetProcName | (baos.asm) | |
Input | A | The PID the name should be changed of. | |
Input | HL | Pointer to string (new name of the process) | |
Output | HL | Pointing to the end of the string, or $FFFF if the caller process doesn't exists (after which you better directly force a system reboot), which should never happen. | |
Description | This function will name the current process, after which the given name can be found in the process-table. If the given name is longer than the table can store, it will automatically be shortened. It's called by the system when you start a program, but programs may rename themself too. | ||
|
|||
Name | Shutdown | (baos.asm) | |
Description | This function will power down the calculator. Called by the OS when ON and 2ND keys are pressed at the same time. | ||
|
|||
Name | Sleep | (baos.asm) | |
Input | B | Interrupts to sleep (see also NewTimer). | |
Output | HL | Zero on success, $FFFF on failure. | |
Description | If a program has to wait a certain amount of time, you can call this function. It will set a special flag inside the process-table, which makes the mutitasking engine just skip this process. After a specified amount of time, a timer will be triggered, which simply calls the wakeup function. This routine resets the flag, after which the process will be acting like a normal one again. | ||
|
|||
Name | Standby | (baos.asm) | |
Description | This function will turn off the calculator, but when the ON-key is pressed, the calculator continous execution. | ||
|
|||
Name | StartFile | (baos.asm) | |
Input | HL | Path to the program | |
Output | HL | $0000 on success, $FFFD if the file couldn't be found, $FFFE if the file isn't executable, $FFFF if an other error occurs. | |
Description | Loads a file from the filesystem into the memory and starts executing that file. The program will be started in a seperate process, and the caller will imediatly resume operation. See also ExecFile. For more options see StartFileEx. | ||
|
|||
Name | StartFileEx | (baos.asm) | |
Input | B | Directory the program will start from. | |
Input | C | Virtual screen to run on. | |
Input | DE | Pointer to name of the program. | |
Input | HL | Path to the program | |
Output | HL | $0000 on success, $FFFD if the file couldn't be found, $FFFE if the file isn't executable, $FFFF if an other error occurs. | |
Description | Loads a file from the filesystem into the memory and starts executing that file. The program will be started in a seperate process, and the caller will immediately resume operation. Has more options than StartFile. See also ExecFile and StartFile | ||
|
|||
Name | Strcat | (baos.asm) | |
Input | DE | Source string | |
Input | HL | Destination String | |
Output | HL | Pointing to the end of the string | |
Description | Concatenates one string to another. | ||
|
|||
Name | Strcmp | (baos.asm) | |
Input | DE | Source string 1 | |
Input | HL | Source string 2 | |
Output | HL | $0000 if both strings were the same, $FFFF otherwise. | |
Description | This function tests if two strings are equal. | ||
|
|||
Name | Strcpy | (baos.asm) | |
Input | DE | Source string | |
Input | HL | Destination String | |
Output | HL | Pointing to the end of the string | |
Description | Copies a string to a place in the memory. | ||
|
|||
Name | Strlen | (baos.asm) | |
Input | DE | Pointer to the string | |
Output | HL | Length of the string (including trailing zero-byte) | |
Description | Returns the length of the given string. | ||
|
|||
Name | Strncat | (baos.asm) | |
Input | A | Maximum number of characters to copy | |
Input | DE | Source string | |
Input | HL | Destination String | |
Output | HL | Pointing to the end of the string | |
Description | Same as Strcat, but has a maximum limit of added characters. | ||
|
|||
Name | Strncmp | (baos.asm) | |
Input | A | Number of bytes to test | |
Input | DE | String 1 | |
Input | HL | String 2 | |
Output | HL | $0000 if the first 'A' characters of both strings were the same, $FFFF otherwise. | |
Description | Checks if the first X bytes of two strings are the same. | ||
|
|||
Name | Strncpy | (baos.asm) | |
Input | A | Maximum number of characters to copy | |
Input | DE | Source string | |
Input | HL | Destination String | |
Output | HL | Pointing to the end of the (destination) string. | |
Description | Same as Strcpy, but has a maximum limit of copied characters. | ||
|
|||
Name | SwitchScreen | (baos.asm) | |
Input | A | Screen to switch to | |
Description | Switches the active virtual screen (the screen "connected" to the physical screen) to the screen A (can be 1-5, where 5 is the graphical screen, which requires a third-party window manager). | ||
|
|||
Name | SysInKey | (baos.asm) | |
Output | HL | ASCII value of pressed key (or zero when no key was pressed) | |
Description | This function return the ascii code of the key currently pressed on the keypad, or a zero if no key was pressed. Special keys will return a non-printable character between 128 and 255. All characters above 127 are not conform ascii. WARNING: This function is system-wide and will also return values if the virtual screen your program is running on is currently NOT selected. | ||
|
|||
Name | TryCleanSec | (baos.asm) | |
Output | HL | $FFFF on Failure (no dead blocks or flash-driver error), $0000 on success. | |
Description | Searches for sectors with dead blocks and tries to clean them. | ||
|
|||
Name | Unlink | (baos.asm) | |
Input | HL | Path to the file. | |
Output | HL | $FFFF on failure, something else on success. | |
Description | Deletes ("kills") a file from the filesystem. In case of a directory, all files and directories inside it are also deleted. | ||
|
|||
Name | WaitForLCD | (baos.asm) | |
Output | A | Garbage | |
Description | Waits for the LCD driver IC to become ready. | ||
|
|||
Name | WaitNoKey | (baos.asm) | |
Output | A | Always Zero. | |
Output | BC | Garbage | |
Output | DE | Garbage | |
Output | HL | Garbage | |
Description | Waits until all keys are released. | ||
|
|||
Name | WakeUp | (baos.asm) | |
Input | A | PID to wake up. | |
Output | HL | Zero on success, $FFFF on failure. | |
Description |
This function wakes up a sleeping process. Under normal circumstances this function will only be called from a timer, activated by the sleep function, however it's theoretically possible to call it to wake-up a process from within another process. NOTE: When called in a normal way (not triggered by a timer), the calling process must disable interrupts before calling (and offcourse enable them afterwards), to prevent a system crash. |
||
|
|||
Name | WriteBlk | (baos.asm) | |
Input | DE | Destination block (in flash-driver format, see also the OS Documentation page) | |
Input | HL | Pointer to data. | |
Output | HL | $FFFF on failure, pointer to end of data (source) on success. | |
Description | Writes 1 block of data to the flash. | ||
|
|||
Name | WriteByte | (baos.asm) | |
Input | DE | Destination address (a 'normal' address between $4000 and $7FFF). | |
Input | HL | Pointer to the byte to write. This byte must reside in the RAM. | |
Output | HL | $FFFF on failure, Initial value + 1 on success. | |
Description | Writes a single byte some place in the FLASH. | ||
|
|||
Name | WriteFile | (baos.asm) | |
Input | BC | The length of the file (in bytes). | |
Input | HL | The file's path (Must reside in the RAM!!) | |
Input | IX | Pointer to the file's data (Must reside in the RAM!!) | |
Output | HL | $0000 on success, $FFFF on failure. | |
Description | Creates a new file. If the file already exists, it is overwritten. All files written by this function are not executable. |