background image

Summary of Contents for 600

Page 1: ...TANDY Reference D CUSTOM MANUFACTURED FOR RADIO SHACK A DIVISION OF TANDY CORPORATION...

Page 2: ...terial without the prior written authori zation by Tandy Corporation is strictly prohibited Tandy 600 Programmers Reference Guide BIOS and BIOS Specification 1986 Tandy Corporation All Rights Reserved...

Page 3: ...TANDY 600 PROGRAMMERS REFERENCE BIOS AND BIOS SPECIFICATION GUIDE...

Page 4: ...des 10 HH O S Function Calls 11 HH O S Database Function Calls 76 Applications Programs Under HH O S 111 Device Drivers Under HH O S 117 Section 2 BIOS Specification 1 23 Appendices A Summation of O S...

Page 5: ...Section 1 PROGRAMMERS REFERENCE...

Page 6: ...ed 41 h Reserved 42h HH O S Function Call 43h DBMS Function Call 44h Free AMI File Space 45h File System Moving 46h Get File Address 47h Translate Address 48h Reserved 49h Reserved 4Ah Reserved 4Bh Re...

Page 7: ...X BX CX DX SP BP SI Dl XXXXXXXX Entry AH Function Code Other registers are function specific Exit Function specific IP FLG CS DS SS ES See the section on Function Calls for descriptions of the availab...

Page 8: ...XX XXXXXXXX XXXXXXXX SP BP SI Dl IP FLG CS DS SS ES Entry AH Function Code DS DX Parameter Block Exit AX Return value or error code See the section on DBMS Function Calls for descriptions of the avail...

Page 9: ...The application program may then free up memory in its AMI file if possible and return to HH O S informing it of how much memory may be recovered from the AMI file Some programs may run more efficient...

Page 10: ...n when the O S function call completes If for example the application program s stack were at the end of the AMI the hook routine could copy the data on the stack down by the requested amount adjust S...

Page 11: ...s need to be kept aware of the movement of files in the system Whenever HH O S moves a portion of the file system it will invoke the File System Moving hook The user provided hook routine can then adj...

Page 12: ...stem to move and then return to the program as usual Because HH O S adjusts the program s segment registers automatically it will not be necessary for a program to use this hook unless it refers to fi...

Page 13: ...t call HH 0 S functions If a device driver or an interrupt service routine needs to be able to find the absolute address of a file it may do so using this interrupt If HH O S is not able to supply the...

Page 14: ...k INT 45h may use this interrupt to adjust file segment pointers The contents of DS DX point to a block of words containing segment addresses which may need adjustment and CX specifies the number of v...

Page 15: ...pen files 5 File access denied 6 Invalid file handle 8 Out of memory 9 Invalid memory block 11 Bad file format 12 Invalid access request 18 No more files 20 File too big 21 Internal file system error...

Page 16: ...yboard 18 25 Set Interrupt Vector 19 29 Parse File Name 20 2A Get Date 21 2B Set Date 22 2C Get Time 23 2D Set Time 24 2E Set Disk Verify After Write Flag 25 35 Get Interrupt Vector 26 36 Get Disk Fre...

Page 17: ...nit Math Pack Data Area 63 DD Set Timer Channel 64 DE Set Alarm Data Time 65 DF Get Current Alarm Setting 66 E0 Get Set Event Flag 67 E1 Set File Size Limit 69 E2 Set Function Key Definition 70 E3 Reo...

Page 18: ...BX CX DX SP BP SI Dl IP FLG CS DS SS ES XXXXXXXX xxxxxxxx Entry AH 01 h function code Exit AX Character Typed Function 01 h waits for a character to be typed at the keyboard then echos the character...

Page 19: ...lay Characters on Console AX BX CX DX SP BP SI Dl IP FLG CS DS SS ES XXXXXXXX XXXXXXXX Entry AH 02h function code DL Character to be displayed Exit None Function 02h displays the character in DL on th...

Page 20: ...SP BP SI Dl IP FLG CS DS SS ES XXXXXXXX XXXXXXXX Entry AH 08h function code Exit AX Character from keyboard Function 08h waits for a character to be typed on the keyboard and then returns it in AX The...

Page 21: ...AH 09h function code DS DX String to be display Exit None xxxxxxxxxxxxxxxxxxx Function 09h will display a string of characters on the LCD display DX contains the offset from the segment in DS of the...

Page 22: ...XXXXXXXX Entry AH OBh function code Exit AL OOh No characters waiting FFh Characters waiting Function OBh checks the keyboard type ahead buffer to see if any characters are waiting to be read It will...

Page 23: ...er flushing keyboard buffer Exit AX Depends upon entry value Function OCh will clear any characters waiting from the keyboard type ahead buffer After clearing the buffer the function will then perform...

Page 24: ...XX XXXXXXXX XXXXXXXX SP BP SI Dl IP FLG CS DS ss ES Entry AH 25h function code AL Interrupt number DS DX Address of interrupt Exit None XXXXXXXXXXXXXXXXXXX Function 25h is used to set an interrupt vec...

Page 25: ...rned will have the following form Field Length NAME 8 EXT 3 DEVICE 8 NAME FLAG 1 EXT_FLAG 1 DEVICE_FLAG 1 File name File extension Device name File name present flag File extension present flag Device...

Page 26: ...XXX XXXXXXXX XXXXXXXX Entry AH 2Ah function code Exit AL Day of week CX Year DH Month DL Day Function 2Ah returns the current date set in the operating system The format of the values returned is CX D...

Page 27: ...onth DL Day AL status code Function 2Bh sets the current date set the operating system The format of the parameters is CX DH DL Year 1980 2099 Month 1 12 1 January 2 February etc Day 1 31 On return fr...

Page 28: ...Entry AH 2Ch function code Exit CH Hour CL Minutes DH Seconds DL Hundredths of seconds IP FLG CS DS SS ES Function 2Ch is used to get the current time from the operating system The format of the value...

Page 29: ...onds DL Hundredths of seconds AL status code Function 2Dh is used to set the current time in the operating system The format of the parameters is CH CL DH DL Hour 0 23 Minutes 0 59 Seconds 0 59 Hundre...

Page 30: ...the setting of the disk verify after write flag If this flag is set ther any disk write operation will be verified after it is completed This increases the reliability of disk write operations but red...

Page 31: ...xxxxx XXXXXXXX XXXXXXXX XXXXXXXX Entry AH 35h function code AL Interrupt number SP BP SI Dl IP FLG Exit ES BX Pointer to interrupt handler CS DS SS ES XXXXXXXXXXXXXXXXXXX Function 35h returns the inte...

Page 32: ...XXX XXXXXXXX XXXXXXXX Entry Exit AH 36h function code DL Drive number If carry not set AX Sectors per cluster BX Number of free clusters CX Bytes per sector DX Total clusters per drive If carry set AX...

Page 33: ...If the file did not exist then a new file will be created and given the specified attributes If the file already existed it will be truncated to zero length On return from the function the carry flag...

Page 34: ...nt in DS of an ASCIIZ string specifying the name of the file to open AL specifies the type of access requested The following access types are defined Access 1 2 Description Read only Write only Read W...

Page 35: ...ion code BX File handle Exit Status code Function 3Eh closes a file On entry to the function BX specifies the handle associated with the file to be closed On return from the function the carry flag wi...

Page 36: ...le On entry to the function BX contains a file handle for a currently open file CX contains the maximum number of bytes to read and DX contains the offset from the segment in DS of the buffer to recei...

Page 37: ...tus code xxxxxxxxxxxxxxxxxxx Function 40h writes a block of data to a file On entry BX contains the file handle of a file opened with write access CX contains the number of bytes to transfer and DX co...

Page 38: ...XX Function 41 h removes a file from the file system On entry the function expects DX o contain the offset from the segment in DS of an ASCIIZ string specifying the name of the file to delete On retur...

Page 39: ...er to CX bytes from the beginning of the file Move the pointer to CX bytes from the current position Move the pointer to CX bytes after the current end of the file The value in CX DX should be regarde...

Page 40: ...XXXXXXXXXXXXXXXX Function 43h allows an application to read or change the attributes of a file On entry AL specifies the operation to perform AL causes the current attributes to be returned in CX AL 1...

Page 41: ...1 2 3 4 5 6 7 Get device information Set device information Read from device control channel Write to device control channel Read from disk device control channel Write to disk device control channel...

Page 42: ...these bits are defined ISCIN This device is console input 1 ISCOT This device is console output 5 MODE raw data mode 1 interpreted data mode 14 CTRL Specifies if the device can accept control strings...

Page 43: ...ion A block allocated in this manner is guaranteed not to move from the time it is allocated until it is released If the carry flag is cleared on return AX will contain the paragraph address of the re...

Page 44: ...xxxx This function will release back to the system a block of memory allocated through function 48h The user loads the paragraph address of the block to be freed into ES and then performs the system c...

Page 45: ...ointer to applications file name string AMIPTR Pointer to AMI file name string PRMPTR Pointer to parameter string 1 HIDFLG specifies whether a newly created AMI should be created as a hidden file or a...

Page 46: ...When control is passed to the application CX DX will point to a copy of the execution parameter block The application program may examine any of the strings pointed to by the execution parameter block...

Page 47: ...to function 4Bh execute program specifying the same program and AMI will cause control to return to the instruction folfowing the one invoking function 4Ch This means that with a positive termination...

Page 48: ...tion Code Entry AH 4Dh function code AX BX CX DX SP BP SI Dl IP FLG CS DS ss ES XXXXXXXX XXXXXXXX Exit AX Process termination code Function 4Dh will return the termination code set by the last program...

Page 49: ...rence On entry DX contains the offset from the segment in DS of an ASCIIZ string specifying the file reference CX contains file attributes which restrict the search On return if the carry flag is rese...

Page 50: ...s modified Dates are stored in packed binary in the following format YYYYYYYMMMMDDDDD Y is year 0 119 1980 2099 M is month 1 12 D is day 1 31 4 File Size This field contains 2 words which give the siz...

Page 51: ...a file information block identifying the next matching file following a call to function 4Eh It is necessary to call function 4Eh before calling function 4Fh On return if the carry flag is reset the...

Page 52: ...4h function code Exit AL Verify flag setting This function returns the current setting of the disk verify after write flag On exit AL will contain the current flag setting If the flag is set AL 1 then...

Page 53: ...CIIZ string specifying the new name that the file is to be given The file directory is searched for a file matching the first specification This file specification may contain wild card characters The...

Page 54: ...ile On entry AL specifies the operation to be performed If AL 0 the current date time of the file will be returned in CX DX If AL 1 the date time in CX DX will be assigned to the file The time in CX a...

Page 55: ...the amount by which the file is to be expanded in CX and the desired method in AL The following methods are defined Method 1 2 Description Expand the file at the beginning Expand the file at the curr...

Page 56: ...current size limit on that file will fail The value returned in CX will be the size of the largest possible block that could be added before the current size limit is exceeded If methods 1 or 2 are r...

Page 57: ...n method is specified in AL The allowed deletion methods are Method Description 1 2 Delete the specified number of bytes at the beginning of the file Delete the specified number of bytes beginning at...

Page 58: ...ze of file in bytes Function D2h is used to find the absolute memory address where a file is stored The user specifies the handle for a previously opened file in BX On return from HH O S the carry fla...

Page 59: ...at this location As a part of normal file operations HH O S will move files within memory Before moving any portion of the file system HH O S will invoke interrupt 45h to indicate what portion of the...

Page 60: ...ecified file The file handle of a previously opened file is passed to HH O S in register BX If the operation succeeds the number of bytes in the file is returned in CX DX with the most significant wor...

Page 61: ...of Free Memory AX BX CX DX SP BP SI Dl IP FLG CS DS SS ES XXXXXXXX xxxxxxxx Entry AH D4h function code Exit AX Size of free memory Function D4h returns the total number of paragraphs of free memory re...

Page 62: ...ch time that a file is modified To use the file mark the following procedure can be used Read the mark immediately before closing the file and save the value The next time the file is accessed read th...

Page 63: ...CX DX SP BP SI Dl IP FLG CS DS SS ES XXXXXXXX XXXXXXXX XXXXXXXX Entry AH D6h function code BX Tone channel number Exit none Function D6h is used to sound an error tone The frequency and duration of t...

Page 64: ...frequency and duration of the error tone sounded when function D6h is executed The frequency is specified in Hertz and is passed in CX The duration is specified in 2 5 millisecond increments and is p...

Page 65: ...plication File Handle AX BX CX DX SP BP SI Dl IP FLG CS DS SS ES XXXXXXXX XXXXXXXX Entry AH D8h function code Exit AX File handle This function returns the fife handle of the currently executing appli...

Page 66: ...Handle AX BX CX DX XXXXXXXX XXXXXXXX SP BP SI Dl IP FLG CS DS SS ES Entry AH D9h function code Exit AX File handle This function returns the file handle of the AMI file which is in use by the currentl...

Page 67: ...not guaranteed to be located within the free memory pool HH O S uses optimization methods for speeding growth of internal files which cause excess space to be allocated to recently accessed files This...

Page 68: ...contains working storage used by the math pack See the math pack section for a description of the user accessible data items within the math pack area On entry BX contains the file handle of the opene...

Page 69: ...ch can be set to signal an event flag at the end of the specified time interval On entry BX specifies the timer channel number to be set 0 7 CX specifies the number of seconds for the timeout interval...

Page 70: ...DS SS ES This function is used to set the next alarm Date Time for the internal alarm system When a restart alarm occurs if the machine is powered off it will be turned on and the application program...

Page 71: ...DFh function code AL Alarm type code Restart alarm 1 Annunciator alarm CY not set AL Day of week 0 6 BX Year 1980 2099 CH Month 1 12 CL Day 1 31 DH Hours 0 23 DL Minutes 0 59 CYset AX Error code This...

Page 72: ...ent state of the specified event flag will be returned in AX If AL 1 the specified event flag will be set to the state specified in CX 0 or 1 The following event flag numbers are defined 1 2 3 4 5 7 8...

Page 73: ...s set when an annunciator type alarm set via function DEh occurs Whenever this event flag is set the alarm annunciator on the bottom line of the system display will flash An application program may tu...

Page 74: ...cified in BX The size limit to be set is specified in CX DX with the high order word in CX After this call any system call which would cause the file to expand Peyond the specified limit will result i...

Page 75: ...FUNCTION E2h Set Function Key Definition AX BX CX DX Entry SP BP SI Dl Exit IP FLG CS DS ss ES 70...

Page 76: ...FUNCTION E3h Reopen File AX BX CX DX SP BP SI Dl IP FLG CS DS SS ES Entry Exit Error returns 71...

Page 77: ...FUNCTION E4h Memory Management for Install AX BX CX DX SP BP SI Dl IP FLG CS DS SS ES Entry Exit Error returns 72...

Page 78: ...FUNCTION E5h Touch Panel Support AX BX cx DX SP BP SI Dl IP FLG CS OS ss ES i i f i I Entry _4 Exit Error returns 73...

Page 79: ...FUNCTION E6h Lock File Open AX BX CX DX SP BP SI Dl IP FLG CS DS ss ES Entry Exit Error returns 74...

Page 80: ...FUNCTION E7h Get Set Alarm Application AX BX CX DX SP BP SI Dl IP FLG CS DS SS ES Entry Exit Error returns 75...

Page 81: ...rror code IP FLG CS DS ss ES The function code for the Database Function to perform is specified in AH DS DX contains a pointer to the parameter block which contains the entry parameters for the speci...

Page 82: ...me 0B Create Field 0C Delete Field 0D Get Field From Open Record 0E Put Field To Open Record OF Get Field From Specified Record 10 Rename Field 1 1 Find Matching Record 12 Get Number of Records 13 Sor...

Page 83: ...me string is an ASCIIZ string of up to 13 characters counting terminating 0 There may not be a disk drive specifier in the name as database files must be in memory to be accessed A database file of th...

Page 84: ...se file name string is an ASCIIZ string of up to 13 characters including terminating 0 The file name string should not contain a disk drive specification as database files must be resident in memory t...

Page 85: ...HANDLE Return Value Error code AX STATUS The FILEHANDLE parameter specifies the file handle for a previously opened database file The file will be closed and the file handle released The file is guara...

Page 86: ...US The FILENAME parameter contains the offset from the segment in DS of a string specifying the name of the database file to be deleted The specified file will be deleted from the file system If the s...

Page 87: ...specifies the ID the record being created is to have If the ID specified is too large to be a legal ID the highest legal ID will be used instead It is not possible to create a database with holes in...

Page 88: ...e handle for a previously opened database file The RECORDID parameter specifies the record ID of the record to open The ACCESSTYPE parameter specifies the type of access to be performed upon the recor...

Page 89: ...le Identifier Return Value AX STATUS Record ID of closed record or error status The FILEHANDLE parameter specifies the file handle for a previously opened database file The currently open record will...

Page 90: ...le The RECORDID contains the record ID of the record to be deleted Deleting a record can cause the record ID s of other records to change Any record ID s which the application program is storing may b...

Page 91: ...LE parameter contains the file handle for an open database file The FIELDNAME parameter contains the offset from the segment in DS of the character string specifying the name of the field The field na...

Page 92: ...US Field Data Typ The FILEHANDLE parameter specifies the file handle for a previously opened database file The FIELDID parameter specifies the field to be accessed The Field Data Type of the specified...

Page 93: ...he FILEHANDLE parameter specifies the file handle of a previously opened database file The FIELDID parameter specifies the field to be accessed The NAMEBUFFER parameter specifies the offset from the s...

Page 94: ...ffset from the segment in DS of an ASCIIZ string which specifies the name of the field to be created The field name may not be longer than 16 characters If it is it will be truncated to 16 characters...

Page 95: ...previously opened database file The FIELDNAME parameter specifies the offset from the segment in DS of an ASCIIZ string which gives the name of the field to be deleted Deletion of a field is not allo...

Page 96: ...sly opened database file The FIELDID parameter specifies the field ID of the field to access The TRANSFERLENGTH parameter specifies the number of bytes to be read from the field The BUFFER parameter s...

Page 97: ...parameter specifies the field ID of the field to access The TRANSFERLENGTH parameter specifies the number of bytes to be written to the field The BUFFER parameter specifies the offset from the segment...

Page 98: ...he RECORDID parameter specifies the record from which the data is to be read The FIELDID parameter specifies the field ID of the field to access The TRANSFERLENGTH parameter specifies the number of by...

Page 99: ...or Error code The FILEHANDLE parameter specifies the file handle of a previously opened database file The OLDNAME parameter specifies the offset from the segment in DS of an ASCIIZ string containing...

Page 100: ...se The SEARCHKEYSEGMENT SEARCHKEY specify the segment and offset to a buffer containing the query key to be used to guide the search Query keys are created by the use of functions 1 5h 19h The search...

Page 101: ...r of Records in File Parameter Block 00 FILE_HANDLE File Identifier Return Value AX STATUS Number of re This function returns the count of records existing in the file specified by the FILEHANDLE para...

Page 102: ...ction is used to define a sort key for the specified database A sort key is made up of a series of sort key fields which have the following form DIRECTION FIELDJD byte byte Descending 1 Ascending Fiel...

Page 103: ...e current sort key in effect for the specified database file The NUMBEROFKEYS field specifies the number of key fields to be returned The key fields returned will always be the first N defined fields...

Page 104: ...determined In this case the buffer must be at least 16 bytes long In mode 1 the query key is actually built In this case the buffer must be large enough to contain the query key being built The size r...

Page 105: ...rn Value AX STATUS Size of Query key The FILEHANDLE parameter contains the file handle of an opened database file for which a query if being constructed The BUFFER and BUFFERSEGMENT parameters specify...

Page 106: ...fer Segment of query key buffer Return Value AX STATUS Error code The FILEHANDLE parameter contains the file handle of an opened database file for which a query key is being constructed The BUFFER and...

Page 107: ...NT Segment of query key buffer Returri Value AX STATUS Error code The FILEHANDLE parameter contains the file handle of an opened database file for which a query key is being constructed The BUFFER and...

Page 108: ...ains the query key being defined The FIELD parameter contains the offset from the segment in DS of the field descriptor for the query field The field descriptor has the following format Pointer to lit...

Page 109: ...OPERAND2 and POINTER is a pointer to the literal 1 compare the field to another field The field ID of the second fieldisinOPERAND2 bit 6 Case is significant in string comparisons 1 Case is not signif...

Page 110: ...Error code The FILEHANDLE parameter specifies the file handle of an opened database file The OLDID parameter specifies the record ID of an existing record which is to be moved The NEWID parameter spec...

Page 111: ...eld descriptor This function checks a query definition field descriptor for errors The FILEHANDLE parameter contains the file handle of an opened database file The FIELD parameter contains the offset...

Page 112: ...existing field in the specified file Any data stored in the changed field is not converted to the new type The data conversion must be performed by the program performing the change field type functi...

Page 113: ...Block 00 FILEJHANDLE 01 RECORD Return Value AX STATUS File Identifier Record number This function wfll return the total number of bytes occupied by the specified record in the specified file The valu...

Page 114: ...records to be compared are specified by giving a file handle and record ID for each record It is legal for the file handles to be the same comparing two records in the same file or different comparing...

Page 115: ...DID parameter specifies the record to which the data is to be written The FIELDID parameter specifies the field ID of the field to access The TRANSFERLENGTH parameter specifies the number of bytes to...

Page 116: ...execution and then resume where it left off at a later time This allows there to be multiple invocations of a given application in existence in the system at the same time each AMI file corresponding...

Page 117: ...n a program terminates control will be returned to the parent who invoked the program Normally this will be the Microsoft System Manager program The OSEXEC function in HH O S maintains a stack of prog...

Page 118: ...when they see this character Program Header Applications programs contain a header used by the HH O S execute program function to verify that the file is executable and to provide the necessary inform...

Page 119: ...ader and the AMI header are checked to ensure that the application actually owns the AMI If an application program were to be run using an AMI file owned by another application the result whould be a...

Page 120: ...by the program must not be larger than 4096 bytes 4 AMIVIS AMI Visability Type Used by the system manager to determine when the application is to be displayed in the left margin possible values are AS...

Page 121: ...n within the AMI that the image of the initialized data is to be copfed 12 DATLEN Data Image length The length of the initialized data image The following define the optional fields in the application...

Page 122: ...he device driver from the system involves calling a deactivation entry point in the driver deallocating the protected memory location that the driver occupied and then modifying the interrupt vector t...

Page 123: ...to the right The following names are legal and represent the complete set of devices for which a driver may be defined KYBD LCD GRPH CASS PRN DSK COM BAR TCH Keyboard input BIOS INT 50h LCD Text outpu...

Page 124: ...moved the values stored here are returned to the interrupt vector to restore the device to the default BIOS driver for the device 7 LENGTH This field specifies the amount of memory in paragraphs that...

Page 125: ...nstallation will be aborted Function 1 Prepare driver for movement INPUT AH Function code DX Address driver will be moved to OUTPUT none ERRORS none must succeed When the HH O S finds it necessary to...

Page 126: ...Point This entry point is the BIOS function call entry point This routine will be entered through the interrupt associated with the device The entry and exit parameters depend upon the device and the...

Page 127: ...Section 2 BIOS SPECIFICATION...

Page 128: ...cter Code Definitions 1 33 Keyboard Support 1 3 Screen LCD Text Support 138 Screen LCD Graphics Support 143 Cassette Support 149 Calendar Time of Day Clock and Alarm Support 152 Sound Support 1 55 Pri...

Page 129: ......

Page 130: ...The RAM Managed by the OEM BIOS is shown as being at lower addresses than the RAM Managed by MS Code in the above diagram This is for illustrative purposes only When control is transferred to the MS...

Page 131: ...parate ROM regions The ROM region containing the Hand Held O S must always be resident and at the same address The other four regions may be removable and located at any address When the BIOS transfer...

Page 132: ...Except as otherwise noted registers that are not used to return values must be preserved by the BIOS For any BIOS calls where no provisions are made for the BIOS to return error codes on out of range...

Page 133: ...eiver Queue Hook initialized to point to a dummy IRET in the BIOS 4Dh Interval Timer Hook initialized to point to a dummy IRET in the BIOS 4Eh Power Low Off Hook initialized to point to a dummy IRET i...

Page 134: ...IRET This hook can be invoked right before invocation of INT 4FH Keyboard Queue Hook Key layout can be modified for European key layouts by using this hook 71 h BIOS Special Extended Function Support...

Page 135: ...d to point to the installed driver The driver program must then provide support for all specified BIOS functions for the given device As an example an installed driver may be used to perform special c...

Page 136: ...function call is received the in use flag for that device is tested If the device is not in use the flag is set to indicate that it is in use and the function returns with an error code of which indi...

Page 137: ...red 1 Receiver Queue Overflow 2 Parity Error 3 Device Not Available 4 Device In Use 5 Device Timeout 6 Receiver Overrun 7 Framing Error 8 Carrier Detect Absent modem only 9 Out of Paper printer only 1...

Page 138: ...ppear on the keyboard may be simulated by combinations of other keys The following table defines the extended function codes Those shown with a Y are required those shown with an N are not required Th...

Page 139: ...r Ret ALT Car Ret Y 138 Shift ESC Shift ESC Shift ESC Y 139 CTRL ESC CTRL ESC CTRL ESC Y 140 ALT ESC ALT ESC ALT ESC Y 141 BREAK Shift BREAK SHIFT BREAK or CTRL BREAK Y 142 Pause CTRL N urn Lock Pause...

Page 140: ...AX Keyboard character FLAGS C Exit FLAGS C the key stroke data returned in AX should be put into the queue FLAGS C 1 the key stroke data should be discarded i e do not put the data into the queue AX...

Page 141: ...etch Key Stroke Entry AH 1 function code Exit FLAGZ Z 1 if no key stroke is available In this case AH and AL are undefined FLAGZ Z if key stroke is available and AX Key stroke data See the section on...

Page 142: ...function 1 is that the character returned is not removed from the keystroke queue INT 50h Function 5 Stuff Key Stroke Entry AH 5 function code BX Key stroke Exit AL Queue full flag character was plac...

Page 143: ...n INT 51 h Function Return text size of screen Entry AH function code Exit AL Screen redraw flag DH highest numbered column number of columns on screen 1 DL highest numbered row number of rows on scre...

Page 144: ...rap Entry AH 7 function code Exit No registers specified With line wrap enabled displaying a character in the rightmost column of the display causes the cursor to advance to the leftmost column of the...

Page 145: ...BL destination row CH column count CL row count DH source column DL source row Exit No registers specified The most common actions performed by the scroll function are to roll the display and move cha...

Page 146: ...ine but the last On the last line ignore any extra characters After this function is completed the cursor should be returned to its original location This function does not affect the setting of the c...

Page 147: ...on the screen to be blanked The start column and row specify the upper left corner of the region to be blanked The current screen mode reverse normal is ignored and the blanked region will be cleared...

Page 148: ...hics operations There are no size restrictions on the internal representation of the graphics attribute since only the external form is used when passing parameters to and from the BIOS Because graphi...

Page 149: ...ics Cursor Up One Pixel Entry AH 5 function code Exit FLAGS C cursor updated FLAGS C 1 cursor was already at minimum Y 0 therefore it was not changed INT 52h Function 6 Set Graphics Attribute Entry AH...

Page 150: ...of the screen Therefore this routine need not check for this condition 3 It is assumed that the caller will never specify a pixel count of 0 Therefore this routine need not check for this condition 4...

Page 151: ...between two horizontally adjacent pixels where the distances are measured from the center of the first pixel to the center of the second pixel Typically this ratio is less than 1 so a given number of...

Page 152: ...g beyond the right edge of the screen This is a speed critical routine it should be coded accordingly INT 52h Function E Put Pixels Entry AH E function code AL pixel data BH operation code Off 1 On 2...

Page 153: ...AH F function code AL attribute 0 off 1 on CX X coordinate DX Y coordinate Exit No registers specified Upon exit the graphics cursor points to the pixel specified by the X Y coordinate pair and the gr...

Page 154: ...assette functions should return the Device Not Available error code The following interrupts support cassette I O INT 53h Function Request Cassette Device Entry AH function code Exit AL Standard BIOS...

Page 155: ...Write the OEM specified block trailer 6 Turn the motor off and return INT 53h Function 5 Read Block Entry AH 5 function code CX buffer length DX segment address of data buffer BX offset address of da...

Page 156: ...e I O is completed Its purpose is to perform any clean up required after using the cassette before it is released INT 53h Function 7 Release Cassette Entry AH 7 function code Exit AL Standard BIOS err...

Page 157: ...Alarm warm start feature works during power off however alarm interruption is ignored during power on The following interrupts support the time of day clock and alarm INT 54h Function Get Current Date...

Page 158: ...INT 54h Function 5 Set Alarm Date Entry AH 5 function code CX year 1980 through 2099 DH month 1 through 12 DL day 1 through 31 Exit AL return code no errors FF invalid date operation aborted INT 54h F...

Page 159: ...For example if timer interrupts occur 18 2 times per second the number returned in AX would be 65535 18 2 or 3601 Real Time Clock RTC with 64 bytes built in RAM is used as follows Offset I O Address C...

Page 160: ...tone should be completed before the next tone is begun If the user types the break key while sound generation is in progress the sound should be stopped and control returned to the calling program Th...

Page 161: ...pose is to perform any initialization required before sending an output stream to the printer INT 56h Function 2 Print Character Entry AH 2 function code AL character to print Exit AL Standard BIOS er...

Page 162: ...after a stream of printer output is completed and before the printer is released It is intended to perform any clean up necessary when releasing the printer INT 56h Function 5 Release Printer Entry AH...

Page 163: ...ecause the Tandy 600 is capable of reading another logical formatted disk The description of the structure of a BPB is repeated here WORD Sector size in bytes must be a multiple of 64 BYTE Sectors per...

Page 164: ...rd BIOS error code DS SI Pointer to new BPB The scratch buffer is available for whatever use the BIOS may require On entry it is not initialized The size of the buffer is determined from the default B...

Page 165: ...of format table Many disk controllers require a data table which contains formatting information such as sector ID fields This call should return the size of the buffer needed to build this table The...

Page 166: ...new disk in the drive before formatting is begun If this flag is set on return from the function the user will be prompted to change the disk before function 7 is called The scratch buffer specified i...

Page 167: ...ed BPB without any FDD access This means that the Tandy 600 only can access FDD formatted media following one of the two standard MS DOS formats The other standard MS DOS format is not available Howev...

Page 168: ...instruction is not on here the BIOS assumes that this is not its original diskette INT 57h Function 9 Deactivate Disk Device Entry Exit AH 9 function code AL Standard BIOS error code The Tandy 600 su...

Page 169: ...AH A function code Exit AL Standard BIOS error code This function is called when access to a disk drive is to be terminated The device should be marked as not busy This function will always turn off t...

Page 170: ...l See further discussion of Warm Start Break below 4 Warm start alarm This occurs when the wake up alarm turns on the power This always causes a warm start regardless of what if any keys may be depres...

Page 171: ...t region 1 Number of ROM regions defined Segment address of the first ROM region region n Segment address of the last ROM region Power On Operation Power on mode Key combination Value of Reg AL Cold S...

Page 172: ...start break Further Considerations Regarding Warm Start Break Within the O S there are critical regions of code that must be allowed to complete once they are begun These regions include file manageme...

Page 173: ...program code to move The O S then switches to its own stack and begins executing the function call When the O S enters a critical region of code that must complete it sets a flag that will cause Warm...

Page 174: ...orms an IRET to return control to whoever was executing when the hardware power off interrupt occurred 7 The IRET will return control to the interrupted O S function which was executing the critical r...

Page 175: ...tical region of code in the O S was being executed The HH O S power off hook routine is not re entrant The first thing this routine does on entry is to set the INT 4Eh vector to point to a dummy IRET...

Page 176: ...ff sequence It is also called by the Microsoft code to turn the power off if the machine has been idle for a certain length of time or if the user explicitly turns the power off through software It do...

Page 177: ...ning when the power was shut off In this case a warm start break is performed This function will be called to inform the BIOS that a warm start break is being performed and that the BIOS should do any...

Page 178: ...ives an interval timer interrupt it must execute an INT 4Dh sometime during the interrupt routine INT 4Dh Interval Timer Hook Entry No registers specified Exit No registers specified The ROM BIOS give...

Page 179: ...s specified Exit No registers specified This interrupt should be invoked when an incoming call is detected on the telephone line INT 4Ch Serial Receiver Queue Hook Entry AL Character Received AH Seria...

Page 180: ...occur for example if the baud rate is set too high INT 59h Function 2 Disconnect Telephone Line Entry AH 2 function code Exit No registers specified This function causes the telephone line to go on ho...

Page 181: ...parameter in AL can be ignored INT 59h Function 6 Dial Telephone Number Entry AH 6 function code AL length of dial string DX segment address of dial string BX offset address of dial string Exit AL Sta...

Page 182: ...OFF enabled BH XON character BL XOFF character CX baud rate 100 except 110 baud which is specified by CX 0 Exit FLAGS C return code no errors 1 illegal configuration parameter s INT 59h Function 8 Ret...

Page 183: ...3 1 200 baud CL mode originate 0FFh answer Exit AL Standard BIOS error code The data rate parameter specified in CH specifies the encoding method to use Note For all of the above routines when an erro...

Page 184: ...ort INT 59h Function 10h Request Serial Device Entry AH 10h function code AL Device number to attach Exit AL Standard BIOS error code This function will be called before accessing a serial device It d...

Page 185: ...r Code Reader Entry AH f u notion code Exit AL Standard BIOS error code This routine will be called before any access to the bar code reader Its purpose is to mark the bar code reader as in use INT 5A...

Page 186: ...indicate that access to the bar code reader is complete This function should perform any necessary clean up INT 5Ah Function 4 Release Bar Code Reader Entry AH 4 function code Exit AL Standard BIOS er...

Page 187: ...eing touched or from being touched to not being touched If a touch pannel is not supported by the hardware the following values should be returned AL BL INT 5Bh Touch Panel Hook Entry BL Current touch...

Page 188: ...called the BIOS no longer needs to scan the touch panel at interrupt level The touch panel can still be polled via functions and 1 While the touch panel is disabled the touch panel cursor should also...

Page 189: ...nel cursor is being displayed when this function is called it must be removed from the screen BIOS Special Extended Functions Following functions are provided for installable printer drivers INT 71 h...

Page 190: ...APPENDICES...

Page 191: ...al operating environment b Low and memory conditions c While in EDIT mode From System Manager perform a RUN on Alarm By RUNNING Alarm it is possible to pop up Alarm from Alarm Set an alarm to go off w...

Page 192: ...ironment file EN VI RON SYS b Move to the NEW record in the NAME field and type the string FK5 c Move over to the TEXT field in the same row and type CALENDAR d Push the enter key then Quit FILE Wait...

Page 193: ...ter Try opening COM in BASIC and then switching between BASIC and an application that is printing to COM Another area is running two invocations of FILE on the same database Try Run previous in variou...

Page 194: ...By configuring the port with Telcom it is possible to hook a device to any external COM port thet the computer may have attached and use it as an output device for applications to print to Note that c...

Page 195: ...ons Check that the screen is redrawn after printing Try Merging from LCD with Word or Loading from LCD with BASIC KYBD KYBD is a read only device All data from KYBD comes from the keyboard Try Merging...

Page 196: ......

Page 197: ...icroso ft Corp Label CALC ALARM Run Quit rrev 123456789 10 Removing Environ sys file then pressing Ctrl Label will result in the following FILE TELCOM PLAN BASIC BAS FORMAT INSTALL LIB T606 WORK SAMPL...

Page 198: ...AAAAAAAAAA AAAAAAAAAA AAAAAAAAAA SORT FIND 1 FK2 CALC 2 FK3 ALARM 3 FK4 WORD 4 FK5 PLAN 5 FK6 IMHSIMI NEW Copy Delete ggHI Find Insert Jump LookUp Move Options Print Select option or type File ENVIRON...

Page 199: ...d letter Removing ENVIRON FIL Done Select option or typi System Manager WORD Bytes free 176320 4 4 1985 10 21 29 AM Final results FILE TELCOM PLAN BASIC BAS FORMAT INSTALL LIB T680 SAMPLE DBCALLS WORK...

Page 200: ......

Page 201: ...on a 2000 following the rules of HH DOS s device drivers as explained in 16 Bit Hand held Operating System Programmers Reference Guide February 25 1985 2 Assemble and link using MASM and MS LINK 3 Th...

Page 202: ...T Binary file name BNAME 400 OPEN HNAMES FOR INPUT AS 1 500 OPEN BNAME FOR OUTPUT AS 2 600 700 H H 800 LINE INPUT 1 L 900 PRINT L 1000 LS LEN L 11 1100 IF LS GOTO 5000 1200 L MID L 10 LS 1300 PRINT L...

Page 203: ...by Microsoft and Radio Shack and the simulator will not support a printer or modem Object Files HHSIM EXE CALC IOO BLDROM EXE WORD I30 Data Files DEBUG ROM HHSIM SYM DEBUG PRM EXECNV EXE HHDEBUG BAT H...

Page 204: ......

Reviews: