File Description : Quick Reference of functions Author : Stephen McNabb Creation Date : 15th February 1995 Last Updated : 15th Februray 1995 This document is a quick reference guide of a list of all the available functions using Gemdos, BIOS and XBIOS. An explanation of the columns follows: Number - opcode number for the function in hex Name - name of the function Add - amount added to stack after execution of function Comment - brief description of function e.g. ...... ...,-(sp) ...... ...,-(sp) move.w #number,-(sp) trap #1 add.l #add,sp Gemdos - Trap #1 ================ Number Name Add Comment ------ ---- --- ------- $00 Pterm0() 2 Exit program $01 Cconin() 2 Read character from keyboard into d0 with echo $02 Cconout() 4 Write character to screen $03 Cauxin() 2 Read character from serial port into d0 $04 Cauxout() 4 Write character to serial port $05 Cprnout() 4 Send character to the printer $06 Crawio() 4 Read character or write a character $07 Crawcin() 2 Read character into d0 without echo $08 Cnecin() 2 Read character into d0 without echo $09 Cconws() 6 Write null terminated string to screen $0A Cconrs() 6 Read string from keyboard $0B Cconis() 2 Test keyboard status $0E Dsetdrv() 4 Set the default drive $10 Cconos() 2 Test screen status $11 Cprnos() 2 Test printer status $12 Cauxis() 2 Test serial port status for input $13 Cauxos() 2 Test serial port status for output $19 Dgetdrv() 2 Get current drive into d0 $1A Fsetdta() 6 Set disk transfer address (DTA) $20 Super() 6 Switch between supervisor and user mode $2A Tgetdate() 2 Get current date into d0 $2B Tsetdate() 4 Set current date $2C Tgettime() 2 Get current time into d0 $2D Tsettime() 4 Set current time $2F Fgetdta() 2 Get address of DTA into d0 $30 Sversion() 2 Get current version number into d0 $31 Ptermres() 8 Terminate and stay resident $36 Dfree() 8 Return free space on drive $39 Dcreate() 6 Create a new directory $3A Ddelete() 6 Delete a directory $3B Dsetpath() 6 Set current directory $3C Fcreate() 8 Create a file $3D Fopen() 8 Open a file $3E Fclose() 4 Close a file $3F Fread() 12 Read from a file $40 Fwrite() 12 Write to a file $41 Fdelete() 6 Delete a file $42 Fseek() 10 Seek within the file $43 Fattrib() 10 Get file attributes $44 Mxalloc() ?? ??? $45 Fdup() 4 Get non-standard file handle $46 Fforce() 6 Force standard handle to point to n-s handle $47 Dgetpath() 8 Get current directory into buffer $48 Malloc() 6 Allocate a block of memory $49 Mfree() 6 Free a block of memory $4A Mshrink() 12 Free up memory $4B Pexec() 16 Execute another program or command $4C Pterm() 4 Terminate current process and return value $4E Fsfirst() 8 Search for a filename $4F Fsnext() 2 Continue search after Fsfirst() $56 Frename() 12 Rename a file $57 Fdatime() 10 Get or set a files date and time $62 Flock() ?? ??? BIOS - Trap #13 =============== Number Name Add Comment ------ ---- --- ------- $00 Getmpb() 6 Get memory pointer block $01 Bconstat() 4 Check input status of device $02 Bconin() 4 Get character from device $03 Bconout() 6 Write character to device $04 Rwabs() 14 Read or write sectors on device $05 Setexec() 8 Get or set exception vectors $06 Tickcal() 2 Get system-timer calibration value into d0 $07 Getppd() 4 Get pointer to Bios parameter block into d0 $08 Bcostat() 4 Get output device status into d0 $09 Mediach() 4 Check for media change $0A Drvmap() 2 Get details of attached drives into d0 $0B Kbshift() 4 Get or set keyboard shift mode XBIOS - Trap #14 ================ Number Name Add Comment ------ ---- --- ------- $00 Initmous() 12 Initialize mouse packet handler $01 Ssbrk() 6 Reserve space from top of memory $02 Physbase() 2 Get screens physical base address into d0 $03 Logbase() 2 Get screens logical base address into d0 $04 Getrez() 2 Get current resolution into d0 $05 Setscreen() 12 Get or set resolution + logic + phys address $06 Setpalette() 6 Set contents of hardware palette register $07 Setcolor() 4 Set a colour in the palette $08 Floprd() 14 Read disk sector $09 Flopwr() 14 Write disk sector $0A Flopfmt() 26 Format a track on disk $0C Midiws() 8 Write a string to MIDI port $0D Mfpint() 8 Set an MFP interrupt $0E Iorec() 4 Get pointer to serial device's buffer record $0F Rsconf() 14 Configure RS-232 port $10 Keytbl() 14 Get/set pointer to keyboard translation tables $11 Random() 2 Get pseudo-random number into d0 $12 Protobt() 14 Make a boot sector and write to disk $13 Flopver() 14 Verify disk sectors $14 Scrdmp() 2 Dump screen to printer $15 Cursconf() 6 Configure cursor $16 Settime() 6 Set system time and date $17 Gettime() 2 Get system time and date into d0 $18 Bioskeys() 2 Restore keyboard translation tables $19 Ikbdws() 8 Write string to keyboard $1A Jdisint() 4 Disable an MFP interrupt $1B Jenabint() 4 Enable an MFP interrupt $1C Giaccess() 4 Read or write to sound chip $1D Offgibit() 4 Set a bit on Port A to zero $1E Ongibit() 4 Set a bit on Port A to one $1F Xbtimer() 10 Set MFP timer $20 Dosound() 6 Set sound parameters $21 Setprt() 4 Get or set configuration of dot matrix printer $22 Kbdvbase() 2 Get address of keyboard vector table into d0 $23 Kbrate() 6 Set keyboard rate $24 Prtblk() 2 Print graphics block to printer $25 Vsync() 2 Wait for next vertical-blank interrupt $26 Supexec() 6 Execute code in supervisor mode $27 Puntaes() 2 Throw away the AES Most of the next few functions are STE only I think!! They were taken from a 'C' header file 'OSBIND.H' so I don't have any information about them. Anyone who knows more about them please contact me. Number Name Add Comment ------ ---- --- ------- $29 Floprate() ?? ??? $2A DMAread() ?? ??? $2B DMAwrite() ?? ??? $2C Bconmap() ?? ??? $2E NMVaccess() ?? ??? $30 Metainit() ?? ??? $40 Blitmode() ?? ??? $50 EsetShift() ?? ??? $51 EgetShift() ?? ??? $52 Esetbank() ?? ??? $53 EsetColor() ?? ??? $54 EsetPalette() ?? ??? $55 EgetPalette() ?? ??? $56 EsetGray() ?? ??? $57 EsetSmear() ?? ??? *** End of File ***