ralf@b.gp.cs.cmu.edu (Ralf Brown) (12/18/88)
AL = number of sectors read Note: used for diagnostics only on PS/2 systems --------------------------------------------- INT 13 - FIXED DISK - WRITE LONG (XT,AT,XT286,PS) AH = 0Bh DL = drive ID DH = head CH = cylinder (bits 8,9 in high bits of CL) CL = sector ES:BX -> buffer containing data Return: CF set on error AH = status code (see AH=1 above) AL = number of sectors written Note: used for diagnostics only on PS/2 systems --------------------------------------------- INT 13 - FIXED DISK - SEEK TO CYLINDER (XT,AT,XT286,PS) AH = 0Ch DL = drive ID DH = head CH = cylinder (bits 8,9 in high bits of CL) Return: CF set on error AH = status code (see AH=1 above) --------------------------------------------- INT 13 - FIXED DISK - ALTERNATE DISK RESET (XT,AT,XT286,PS) AH = 0Dh DL = drive ID Return: CF set on error AH = status code (see AH=1 above) --------------------------------------------- INT 13 - FIXED DISK - READ SECTOR BUFFER (XT,PS) AH = 0Eh ES:BX -> buffer Return: CF set on error AH = status code (see AH=1 above) Notes: transfers controller's sector buffer. No data is read from the drive used for diagnostics only on PS/2 systems --------------------------------------------- INT 13 - FIXED DISK - WRITE SECTOR BUFFER (XT,PS) AH = 0Fh ES:BX -> buffer Return: CF set on error AH = status code (see AH=1 above) Notes: should be called before formatting to initialize the controller's sector buffer. used for diagnostics only on PS/2 systems --------------------------------------------- INT 13 - FIXED DISK - TEST FOR DRIVE READY (XT,AT,XT286,PS) AH = 10h DL = drive ID Return: CF set on error AH = status code (see AH=1 above) --------------------------------------------- INT 13 - FIXED DISK - RECALIBRATE DRIVE (XT,AT,XT286,PS) AH = 11h DL = drive ID Return: CF set on error AH = status code (see AH=1 above) --------------------------------------------- INT 13 - FIXED DISK - CONTROLER RAM DIAGNOSTIC (XT,PS) AH = 12h Return: CF set on error AH = status code (see AH=1 above) Note: used for diagnostics only on PS/2 systems --------------------------------------------- INT 13 - FIXED DISK - DRIVE DIAGNOSTIC (XT,PS) AH = 13h Return: CF set on error AH = status code (see AH=1 above) Note: used for diagnostics only on PS/2 systems --------------------------------------------- INT 13 - FIXED DISK - CONTROLLER DIAGNOSTICS (XT,AT,XT286,PS) AH = 14h Return: CF set on error AH = status code (see AH=1 above) Note: used for diagnostics only on PS/2 systems --------------------------------------------- INT 13 - DISK - GET TYPE (AT,XT2,XT286,CONV,PS) AH = 15h DL = drive ID Return: CF set on error AH = disk type 0 = disk not there 1 = floppy, no change detection present 2 = floppy with change detection 3 = fixed disk CX:DX = number of 512-byte sectors --------------------------------------------- INT 13 - FLOPPY DISK - CHANGE OF DISK STATUS (AT,XT2,XT286,CONV,PS) AH = 16h DL = drive to check Return: AH = disk change status 0 = no disk change 6 = disk changed --------------------------------------------- INT 13 - DISK - SET TYPE (AT,XT2,XT286,CONV,PS) AH = 17h AL = disk type 00h = no disk 01h = regular disk in regular drive 02h = regular disk in high-capacity drive 03h = high-capacity disk in high-capacity drive 04h = 720K disk in 720K drive DL = drive ID --------------------------------------------- INT 13 - DISK - SET MEDIA TYPE FOR FORMAT (AT model 3x9,XT2,XT286,PS) AH = 18h DL = drive number CH = lower 8 bits of number of tracks CL = sectors per track (bits 0-5) top 2 bits of number of tracks (bits 6,7) Return: AH = 00h requested combination supported 01h function not available 0Ch not supported or drive type unknown 80h there is no disk in the drive ES:DI -> 11-byte parameter table --------------------------------------------- INT 13 - FIXED DISK - PARK HEADS (XT286,PS) AH = 19h DL = drive Return: CF set on error AH = status (see AH=1 above) --------------------------------------------- INT 13 - ESDI FIXED DISK - FORMAT UNIT (PS) AH = 1Ah AL = defect table count CL = format modifiers bit 0: ignore primary defect map bit 1: ignore secondary defect map bit 2: update secondary defect map bit 3: perform surface analysis bit 4: generate periodic interrupt DL = drive ES:BX -> defect table Return: CF set on error AH = status (see AH=1 above) Note: if periodic interrupt selected, INT 15h/AH=0Fh is called after each cylinder is formatted --------------------------------------------- INT 13 - DISK - ??? (PS/2) AH = 1Ch AL = ??? (0Ah one value) Return: ??? Note: used by LLFORMAT.COM on PS/2 50/60 reference disk --------------------------------------------- INT 13 - DISK - ??? (Western Digital "Super BIOS") AH = 20h ??? Return: ??? Note: seems to return some kind of status --------------------------------------------- INT 14 - SERIAL I/O - INITIALIZE USART AH = 00h AL = initializing parameters 7 - 6 - 5 4 - 3 2 1 - 0 -BAUD RATE- PARITY STOP WORD BITS LENGTH 000 110 bd 00 none 0-1 10 - 7 001 150 bd 01 odd 1-2 11 - 8 010 300 bd 11 even 011 600 bd 100 1200 bd 101 2400 bd 110 4800 bd 111 9600 bd (4800 on PCjr) DX = port number (0-3) Return: AH = RS-232 status code bits 0: data ready 1: overrun error 2: parity error 3: framing error 4: break detected 5: transmission buffer register empty 6: transmission shift register empty 7: time out--if set, other bits invalid AL = modem status bits 0: delta Clear-To-Send 1: delta Data-Set-Ready 2: trailing edge of ring detected 3: change in receive line signal detected 4: Clear-To-Send 5: Data-Set-Ready 6: ring detected 7: receive line signal detected --------------------------------------------- INT 14 - FOSSIL (Fido/Opus/Seadog Standard Interface Level) - INITIALIZE AH = 00h AL = initializing parameters 7 - 6 - 5 4 - 3 2 1 - 0 -BAUD RATE- PARITY STOP WORD BITS LENGTH 000 19200 bd 00 none 0-1 10 - 7 001 38400 bd 01 odd 1-2 11 - 8 010 300 bd 11 even 011 600 bd 100 1200 bd 101 2400 bd 110 4800 bd 111 9600 bd (4800 on PCjr) DX = port number (0-3) Return: AH = RS-232 status code bits 0: RDA - input data is available in buffer 1: OVRN - data has been lost 5: THRE - room is available in output buffer 6: TSRE - output buffer empty AL = modem status bits 3: always 1 7: DCD - carrier detect --------------------------------------------- INT 14 - SERIAL I/O - TRANSMIT CHARACTER AH = 01h AL = character DX = port number (0-3) Return: AX = port status (see AH = 00h above) --------------------------------------------- INT 14 - SERIAL I/O - RECEIVE CHARACTER AH = 02h DX = port number (0-3) Return: AL = character received AH = RS-232 status code (see AH = 00h above) Note: will timeout if DSR is not asserted, even if function 03h returns data ready --------------------------------------------- INT 14 - FOSSIL - RECEIVE CHARACTER WITH WAIT AH = 02h DX = port number (0-3) Return: AL = character received AH = 00h --------------------------------------------- INT 14 - SERIAL I/O - GET USART STATUS AH = 03h DX = port number (0-3) Return: AX = port status code (see AH = 00h above) --------------------------------------------- INT 14 - SERIAL I/O - EXTENDED INITIALIZE (CONVERTIBLE,PS) AH = 04h AL = break status 0 if break 1 if no break BH = parity 0 no parity 1 odd parity 2 even parity 3 stick parity odd 4 stick parity even BL = number of stop bits 0: one stop bit 1: two stop bits (1.5 if 5 bit word length) CH = word length 0: 5 bits 1: 6 bits 2: 7 bits 3: 8 bits CL = baud rate 0: 110 1: 150 2: 300 3: 600 4: 1200 5: 2400 6: 4800 7: 9600 8: 19200 DX = port number Return: AX = port status code (see AH = 00h above) --------------------------------------------- INT 14 - FOSSIL - INITIALIZE DRIVER AH = 04h DX = port number optionally BX=4F50h ES:CX = address of byte to be set upon ^C Return: AX = 1954h (if successful) BL = maximum function number supported (excluding 7Eh and above) BH = revision of FOSSIL supported DTR is raised --------------------------------------------- INT 14 - SERIAL I/O - EXTENDED COMMUNICATION PORT CONTROL (CONVERTIBLE,PS) AH = 05h AL = 0 read modem control register Return: BL = modem control register (see below) AH = status AL = 1 write modem control register BL = modem control register bit 0: data terminal ready bit 1: request to send bit 2: OUT1 bit 3: OUT2 bit 4: LOOP bits 5-7 reserved Return: AX = status DX = port number --------------------------------------------- INT 14 - FOSSIL - DEINITIALIZE DRIVER AH = 05h DX = port number Return: none DTR is not affected --------------------------------------------- INT 14 - FOSSIL - RAISE/LOWER DTR AH = 06h DX = port AL = DTR state to be set 00h = lower 01h = raise --------------------------------------------- INT 14 - FOSSIL - RETURN TIMER TICK PARAMETERS AH = 07h Return: AL = timer tick interrupt number AH = ticks per second on interrupt number in AL DX = approximate number of milliseconds per tick --------------------------------------------- INT 14 - FOSSIL - FLUSH OUTPUT BUFFER WAITING TILL ALL OUTPUT IS DONE AH = 08h DX = port number --------------------------------------------- INT 14 - FOSSIL - PURGE OUTPUT BUFFER THROWING AWAY ALL PENDING OUTPUT AH = 09h DX = port number --------------------------------------------- INT 14 - FOSSIL - PURGE INTPUT BUFFER THROWING AWAY ALL PENDING INPUT AH = 0Ah DX = port number --------------------------------------------- INT 14 - FOSSIL - TRANSMIT NO WAIT AH = 0Bh AL = character DX = port number Return: AX = 0000h character not accepted = 0001h character accepted --------------------------------------------- INT 14 - FOSSIL - NON-DESTRUCTIVE READ AHEAD AH = 0Ch DX = port number Return: AX = FFFFh character not available AX = 00xxh character xx available --------------------------------------------- INT 14 - FOSSIL - KEYBOARD READ WITHOUT WAIT AH = 0Dh Return: AX = FFFFh character not available = xxyyh standard IBM-style scan code --------------------------------------------- INT 14 - FOSSIL - KEYBOARD READ WITH WAIT AH = 0Eh Return: AX = xxyyh standard IBM-style scan code --------------------------------------------- INT 14 - FOSSIL - ENABLE/DISABLE FLOW CONTROL AH = 0Fh AL = bit mask describing flow control requested 0: xon/xoff on transmit (watch for xoff while sending) 1: CTS/RTS (CTS on transmit/RTS on receive) 2: reserved 3: xon/xoff on receive (send xoff when buffer near full) 4-7: all 1 DX = port number --------------------------------------------- INT 14 - FOSSIL - EXTENDED ^C/^K CHECKING AND TRANSMIT ON/OFF AH = 10h AL = bit mask 0: enable/disable ^C/^K checking 1: enable/disable the transmitter DX = port number --------------------------------------------- INT 14 - FOSSIL - SET CURRENT CURSOR LOCATION AH = 11h DH = row DL = column Note: this is the same as INT 10/AH=02h --------------------------------------------- INT 14 - FOSSIL - READ CURRENT CURSOR LOCATION AH = 12h Return: DH = row DL = column Note: this is the same as INT 10/AH=03h --------------------------------------------- INT 14 - FOSSIL - SINGLE CHARACTER ANSI WRITE TO SCREEN AH = 13h AL = character --------------------------------------------- INT 14 - FOSSIL - ENABLE OR DISABLE WATCHDOG PROCESSING AH = 14h AL = 01h enable watchdog 00h disable watchdog DX = port number --------------------------------------------- INT 14 - FOSSIL - WRITE CHARACTER TO SCREEN USING BIOS SUPPORT ROUTINES AH = 15h AL = character --------------------------------------------- INT 14 - FOSSIL - INSERT/DELETE FUNCTION FROM TIMER TICK CHAIN AH = 16h AL = function 00h = delete 01h = add ES:DX -> routine to call Return: AX = 0000h successful 0001h unsuccessful --------------------------------------------- INT 14 - FOSSIL - REBOOT SYSTEM AH = 17h AL = method 00h = cold boot 01h = warm boot --------------------------------------------- INT 14 - FOSSIL - READ BLOCK AH = 18h CX = maximum number of characters to transfer DX = port number ES:DI -> user buffer Return: AX = number of characters transfered --------------------------------------------- INT 14 - FOSSIL - WRITE BLOCK AH = 19h CX = maximum number of characters to transfer DX = port number ES:DI -> user buffer Return: AX = number of characters transfered --------------------------------------------- INT 14 - FOSSIL - BREAK BEGIN OR END AH = 1Ah AL = 00h stop sending 'break' 01h start sending 'break' DX = port number --------------------------------------------- INT 14 - FOSSIL - RETURN INFORMATION ABOUT THE DRIVER AH = 1Bh DX = port number CX = size of user buffer ES:DI -> user buffer Return: AX = number of characters transferred Structure = WORD size of structure in bytes BYTE FOSSIL spec driver conforms to BYTE revision level of this specific driver DWORD pointer to ASCII identification string WORD size of the input buffer WORD number of bytes left in buffer WORD size of the output buffer WORD number of bytes left in buffer BYTE width of screen BYTE length of screen BYTE actual baud rate, computer to modem --------------------------------------------- INT 14 - FOSSIL - INSTALL AN EXTERNAL APPLICATION FUNCTION AH = 7Eh AL = code assigned to external application ES:DX -> entry point Return: AX = 1954h BL = code assigned to application (same as input AL) DH = 00h failed 01h successful --------------------------------------------- INT 14 - FOSSIL - REMOVE AN EXTERNAL APPLICATION FUNCTION AH = 7Fh AL = code assigned to external application ES:DX -> entry point Return: AX = 1954h BL = code assigned to application (same as input AL) DH = 00h failed 01h successful --------------------------------------------- INT 15 - CASSETTE - TURN ON MOTOR (PC,Jr) AH = 00h Return: CF set on error, AH = 86h if no cassette present --------------------------------------------- INT 15 - CASSETTE - TURN OFF MOTOR (PC,Jr) AH = 01h Return: CF set on error, AH = 86h if no cassette present --------------------------------------------- INT 15 - CASSETTE - READ DATA BLOCKS (PC,Jr) AH = 02h CX = count of bytes ES:BX -> data area Return: CF set on error AH = status 01h CRC error 02h bad tape signals 04h no data 80h invalid command 86h no cassette present DX = count of bytes read ES:BX = pointer past last byte read --------------------------------------------- INT 15 - CASSETTE - WRITE DATA BLOCKS (PC,Jr) AH = 03h CX = count of bytes to write ES:BX -> data area Return: CF set on error AH = status (see above) ES:BX = pointer past last byte written CX = 0 --------------------------------------------- Int 15 - SYSTEM - FORMAT UNIT PERIODIC INTERRUPT (PS ESDI drives only) AH = 0Fh AL = phase code 00h reserved 01h surface analysis 02h formatting Return: CF clear if formatting should continue, set if it should terminate Note: called during ESDI drive formatting after each cylinder is completed --------------------------------------------- INT 15 - TopView - "PAUSE" - GIVE UP CPU TIME AX = 1000h Return: after other processes run --------------------------------------------- INT 15 - TopView - "GETMEM" - ALLOCATE "SYSTEM" MEMORY AX = 1001h BX = number of bytes to allocate Return: ES:DI -> block of memory --------------------------------------------- INT 15 - TopView - "PUTMEM" - DEALLOCATE "SYSTEM" MEMORY AX = 1002h ES:DI -> previously allocated block Return: block freed --------------------------------------------- INT 15 - TopView - "PRINTC" - DISPLAY CHARACTER/ATTRIBUTE ON SCREEN AX = 1003h BH = attribute BL = character DX = segment of object handle for window Note: BX=0 does not display anything, it only positions the hardware cursor --------------------------------------------- INT 15 - TopView - UNIMPLEMENTED IN DV 2.x AH = 10h AL = 04h thru 12h Return: pops up "Programming error" window in DV 2.x --------------------------------------------- INT 15 - TopView - "GETBIT" - DEFINE A 2ND-LEVEL INTERRUPT HANDLER AX = 1013h ES:DI -> FAR service routine Return: BX = bit mask indicating which bit was allocated 0 if no more bits available --------------------------------------------- INT 15 - TopView - "FREEBIT" - UNDEFINE A 2ND-LEVEL INTERRUPT HANDLER AX = 1014h BX = bit mask from INT 15/AX=1013h --------------------------------------------- INT 15 - TopView - "SETBIT" - SCHEDULE ONE OR MORE 2ND-LEVEL INTERRUPTS AX = 1015h BX = bit mask for interrupts to post Return: indicated routines will be called: (DV 2.0x) at next task switch (DV 2.2x) immediately --------------------------------------------- INT 15 - TopView - "ISOBJ" - VERIFY OBJECT HANDLE AX = 1016h ES:DI = possible object handle Return: BX = -1 if ES:DI is a valid object handle 0 if ES:DI is not --------------------------------------------- INT 15 - TopView - UNIMPLEMENTED IN DV 2.x AX = 1017h Return: pops up "Programming error" window in DV 2.x --------------------------------------------- INT 15 - TopView - "LOCATE" - FIND WINDOW AT A GIVEN SCREEN LOCATION AX = 1018h BH = column BL = row ES = segment of object handle for ??? (0 = use default) Return: ES = segment of object handle for window which is visible at the indicated position --------------------------------------------- INT 15 - TopView - "SOUND" - MAKE TONE AX = 1019h BX = frequency in Hertz CX = duration in clock ticks (18.2 ticks/sec) Return: immediately, tone continues to completion Notes: if another tone is already playing, the new tone does not start until completion of the previous one. In DV 2.00, it is possible to enqueue about 32 tones before the process is blocked until a note completes. in DV 2.00, the lowest tone allowed is 20 Hz --------------------------------------------- INT 15 - TopView - "OSTACK" - SWITCH TO TASK'S INTERNAL STACK AX = 101Ah Return: stack switched --------------------------------------------- INT 15 - TopView - "BEGINC" - BEGIN CRITICAL REGION AX = 101Bh Return: task-switching temporarily disabled Note: will not task-switch until END CRITICAL REGION (AX = 101Ch) called --------------------------------------------- INT 15 - TopView - "ENDC" - END CRITICAL REGION AX = 101Ch Return: task-switching enabled --------------------------------------------- INT 15 - TopView - "STOP" - STOP TASK AX = 101Dh ES = segment of object handle for task to be stopped (== handle of main window for that task) Return: indicated task will no longer get CPU time Note: at least in DV 2.00, this function is ignored unless the indicated task is the current task. --------------------------------------------- INT 15 - TopView - "START" - START TASK AX = 101Eh ES = segment of object handle for task to be started (== handle of main window for that task) Return: indicated task is started up again --------------------------------------------- INT 15 - TopView - "DISPEROR" - POP-UP ERROR WINDOW AX = 101Fh BX = bit fields bits 0-12: number of characters to display bits 13,14: which mouse button may be pressed to remove window 00 = either 01 = left 10 = right 11 = either bit 15: beep if 1 DS:DI -> text of message CH = width of error window (0 = default) CL = height of error window (0 = default) DX = segment of object handle Return: BX = status: 1 = left button, 2 = right, 27 = ESC pressed Note: window remains on-screen until ESC or indicated mouse button is pressed --------------------------------------------- INT 15 - TopView - UNIMPLEMENTED IN DV 2.0x AX = 1020h Return: pops up "Programming error" window in DV 2.0x --------------------------------------------- INT 15 - TopView - "PGMINT" - INTERRUPT ANOTHER TASK AX = 1021h BX = segment of object handle for task to interrupt DX:CX = address of FAR routine to jump to next time task is run Return: nothing??? Note: the current ES, DS, SI, DI, and BP are passed to the FAR routine --------------------------------------------- INT 15 - TopView - "GETVER" - GET VERSION AX = 1022h BX = 0 Return: BX nonzero, TopView or compatible loaded (BL = major version, BH = minor version) Notes: TaskView returns BX = 0001h, DESQview 2.0 returns BX = 0A01h --------------------------------------------- INT 15 - TopView - "POSWIN" - POSITION WINDOW AX = 1023h BX = segment of object handle for parent window within which to position the window (0 = full screen) ES = segment of object handle for window to be positioned DL = bit flags bits 0,1: horizontal position 00 = current 01 = center 10 = left 11 = right bits 2,3: vertical position 00 = current 01 = center 10 = top 11 = bottom bit 4: don't redraw screen if set bits 5-7 not used CH = number of columns to offset from position specified by DL CL = number of rows to offset from position specified by DL Return: nothing --------------------------------------------- INT 15 - TopView - "GETBUF" - GET VIRTUAL SCREEN INFO AX = 1024h BX = segment of object handle for window (0 = use default) Return: ES:DI = address of virtual screen CX = size of virtual screen in bytes DL = 0 ??? 1 ??? --------------------------------------------- INT 15 - TopView - "USTACK" - SWITCH BACK TO USER'S STACK AX = 1025h Return: stack switched back Note: call only after INT 15h/AX=101Ah --------------------------------------------- INT 15 - DESQview (TopView???) - UNIMPLEMENTED IN DV 2.0x AH = 10h AL = 26h thru 2Ah Return: pops up "Programming error" window in DV 2.0x --------------------------------------------- INT 15 - DESQview 2.0 (TopView???) - "POSTTASK" - AWAKEN TASK AX = 102Bh BX = segment of object handle for task Return: nothing --------------------------------------------- INT 15 - DESQview 2.0 (TopView???) - START NEW APPLICATION IN NEW PROCESS AX = 102Ch ES:DI -> contents of .PIF/.DVP file BX = size of .PIF/.DVP info Return: BX = segment of object handle for new task 0 on error --------------------------------------------- INT 15 - DESQview 2.0 - KEYBOARD MOUSE CONTROL AX = 102Dh BL = subfunction 00h determine whether using keyboard mouse 01h turn keyboard mouse on 02h turn keyboard mouse off Return: if BL was 00h, BL = 0 using real mouse 1 using keyboard mouse --------------------------------------------- INT 15 - TopView commands AH = 11h AL = various Note: in DESQview 2.x, these function calls are identical to AH=DEh, so see those below --------------------------------------------- INT 15 - DESQview 2.2 - GET AND SET ??? AX = 1117h BX = 0 get old value of ??? without setting nonzero set ??? Return: BX = old value of ??? Note: this function differs from AX = DE17h --------------------------------------------- INT 15 - TopView - SEND MESSAGE - "HANDLE" - RETURN OBJECT HANDLE AH = 12h BH = 00h BL = which handle to return 00h handle in DWORD on top of stack 01h current task's window handle 02h given task's mailbox handle (task's handle on stack) 03h current task's mailbox handle 04h given task's keyboard handle (task's handle on stack) 05h current task's keyboard object handle 06h given task's OBJECTQ handle (task's handle on stack) 07h current task's OBJECTQ handle 08h \ thru > return 0000:0000 10h / Return: DWORD on top of stack is object handle --------------------------------------------- INT 15 - TopView - SEND MESSAGE - "NEW" - CREATE NEW OBJECT AH = 12h BH = 01h BL = object 00h (DV 2.0x only) handle is DWORD on top of stack 01h (DV 2.0x only) use task's window handle 02h (DV 2.0x only) given task's mailbox (task's handle on stack) 03h (DV 2.0x only) current task's mailbox 04h (DV 2.0x only) given task's keyboard (task's handle on stack) 05h (DV 2.0x only) current task's keyboard object 08h WINDOW class 09h MAILBOX class 0Ah KEYBOARD class 0Bh TIMER object (counts down 32-bit time in 10ms increments) 0Fh POINTER object 10h PANEL object STACK: (if window object or WINDOW class) DWORD address to jump to (no new task if high word == 0) DWORD ??? (doesn't seem to be used) DWORD bytes for task's private stack (-1 == default of 0100h) DWORD bytes system memory allocation (0 == none, -1 == default) DWORD window size, columns DWORD window size, rows DWORD length of window title DWORD address of window title Return: DWORD on top of stack is new object handle Note: if a new task is created, it is started with AX = BX = CX = SI = DI = BP = 0 DX = segment of parent's object handle DS = ES = SS = segment of private stack (and new task's object handle) --------------------------------------------- INT 15 - TopView - SEND MESSAGE - "FREE" - FREE AN OBJECT AH = 12h BH = 02h BL = object 00h handle in DWORD on top of stack window: close window and free timer: free timer panel: free panel object pointer: free pointer 01h task's window handle - kills task, never returns 02h given task's mailbox (task's handle on top of stack) 03h current task's mailbox 04h given task's keyboard (task's handle on top of stack) 05h current task's keyboard object --------------------------------------------- INT 15 - TopView - SEND MESSAGE - "DIR" - GET PANEL FILE DIRECTORY AH = 12h BX = 0300h STACK: DWORD handle of panel object Return: STACK: DWORD length of directory DWORD address of directory Format of panel file: BYTE C0h C3h BYTE number of panels in file for each panel in file 8 BYTES blank-padded panel name DWORD panel offset in file WORD panel length data for panels (each panel consists of one or more window/query/manager streams) first byte of each panel must be 1Bh, fifth byte must be E5h --------------------------------------------- INT 15 - TopView - SEND MESSAGE - "ADDR" - GET OBJECT HANDLE AH = 12h BH = 03h BL = object 00h handle in DWORD on top of stack 02h sender of last msg read from mailbox (task's handle on stack) 03h sender of last msg read from current task's mailbox Return: DWORD on stack is handle --------------------------------------------- INT 15 - TopView - SEND MESSAGE - "READ" - WAIT FOR TIMER TO EXPIRE AH = 12h BX = 0400h STACK: DWORD timer's handle Return: STACK: DWORD time in 1/100 sec since midnight when timer expires --------------------------------------------- INT 15 - TopView - SEND MESSAGE - "READ" - GET NEXT RECORD AH = 12h BH = 04h BL = object 00h handle is DWORD on top of stack window: read next logical line mailbox: wait for and get next message pointer: wait for and get next message 01h read the next logical line from task's default window 02h get next message from mailbox (task's handle on top of stack) 03h get next message from current task's mailbox 04h get the next input from keyboard (handle on top of stack) 05h get the next input from task's default keyboard 06h wait for input from any object in OBJECTQ (handle on stack) 07h wait for input from any object in task's default OBJECTQ Return: STACK: (if objectq) DWORD handle of object with input (otherwise) DWORD number of bytes DWORD address --------------------------------------------- INT 15 - TopView - SEND MESSAGE - "APPLY" - WRITE PANEL TO WINDOW AH = 12h BX = 0400h STACK: DWORD handle of panel object DWORD window's handle or 0 DWORD length of panel name DWORD pointer to panel name Return: STACK: DWORD handle of created keyboard or 0 DWORD handle of window which was used Notes: status of APPLY may be checked with STATUS message panel MUST have the following format first byte must be 1Bh (i.e. must start with a stream) first opcode in stream must be E5h single byte arg of opcode is interpreted thus: bit 7 \ 11 means new window created bit 6 / 01 means existing window used bit 5 if set, create a new keyboard and put in field mode bit 4 if set and bit 5 set, make new keyboard active -------------------------------------------- INT 15 - TopView - SEND MESSAGE - "WRITE" - WRITE TO OBJECT AH = 12h BH = 05h BL = object 00h handle is DWORD on top of stack timer: start timer to end at a specified time pointer: move pointer icon to specified position 02h send message by value/status=0 to mbox (task's handle on stack) 03h send message by value/status=0 to current task's mailbox 04h add input buffer to KEYBOARD queue (handle on top of stack) 05h add input buffer to task's default KEYBOARD queue 06h add an object to OBJECTQ (handle on top of stack) 07h add an object to task's default OBJECTQ STACK: (if mailbox) DWORD length DWORD address (if keyboard) DWORD status (such as scan code) DWORD length DWORD address (if objectq) DWORD handle of object to add (if timer) DWORD 1/100ths seconds since midnight (actually only accurate to 1/18 sec) (if pointer) DWORD column relative to origin of window DWORD row relative to origin of window --------------------------------------------- INT 15 - TopView - SEND MESSAGE - "WRITE" - WRITE STRING TO WINDOW AH = 12h BH = 05h BL = object 00h DWORD on top of stack is window handle 01h write string to task's default window STACK: DWORD object handle if handle passed on stack DWORD total length of string (high word == 0) DWORD address of string to display Note: service routine will pop stack Return: indicated actions performed a. non-control characters are displayed b. CR/LF/BS/Tab cause the usual cursor movement c. ESC starts a data structure with additional commands Data Structure: MAGIC DB 1Bh MODE DB ? ; 00h, 01h, 10h, 14h-1Fh legal LENGTH DW ? ; length of remainder in bytes var-length fields follow, each an OPCODE followed by zero or more args MODE 00h (set or display values) "WINDOW STREAM" Opcodes:args 00h display 20h blanks with the default attribute 01h-1Fh display OPCODE blanks with the default attribute 20h display char with default attribute 20h times BYTE char to repeat 21h-3Fh display char with default attribute OPCODE-20h times BYTE char to repeat 40h display 20h blanks with specified attribute BYTE attribute of blanks 41h-5Fh display OPCODE-40h blanks with specified attribute BYTE attribute of blanks 60h display next 20h characters 20h BYTES characters to display 61h-7Fh display next OPCODE-60h characters N BYTES characters to display 80h-87h display N blanks with default attribute BYTE low 8 bits of 11-bit count (high 3 in low 3 bits of OPCODE) [000h means 800h] 88h-8Fh display N copies of the character BYTE low 8 bits of 11-bit count (high 3 in low 3 bits of OPCODE) [000h means 800h] BYTE character to repeat 90h-97h display N blanks with specified attribute BYTE low 8 bits of 11-bit length (high 3 in low 3 bits of OPCODE) [000h means 800h] BYTE attribute 98h-9FH display string at logical cursor pos BYTE low 8 bits of 11-bit length (high 3 in low 3 bits of OPCODE) [000h means 800h] N BYTES string to display A0h set logical cursor row BYTE row number (0 is top) A1h set logical cursor column BYTE column number (0 is leftmost) A2h set top edge of scrolling region BYTE row A3h set left edge of scrolling region BYTE column A4h set row of physical window position BYTE line A5h set column of physical window position BYTE column A6h set height of physical window BYTE #rows A7h set width of physical window BYTE #columns A8h set viewport row BYTE row A9h set viewport column BYTE column AAh set virtual screen height BYTE rows ABh set virtual screen width BYTE columns ACh-AEh unused AFh ??? BYTE ??? (ANDed with current value of something) B0h move logical cursor down BYTE #rows (signed, negative values move up) B1h move logical cursor right BYTE #cols (signed, negative values move left) B2h shift top edge of scrolling region BYTE #rows (signed) B3h shift left edge of scrolling region BYTE #cols (signed) B4h shift window down BYTE #lines (signed) B5h shift window right BYTE #columns (signed) B6h expand physical window vertically BYTE #lines (signed) B7h expand physical window horizontally BYTE #columns (signed) B8h adjust viewport row BYTE #rows (signed) B9h adjust viewport column BYTE #columns (signed) BAh adjust virtual screen height BYTE #rows to increase (signed) BBh adjust virtual screen width BYTE #cols to increase (signed) BCh-BFh unused C0h set logical cursor position BYTE row number (0 is top border) BYTE column number (0 is left border) C1h set top left corner of scrolling region BYTE row BYTE column C2h set window pos BYTE upper left row (no top border if 0) BYTE upper left column (no left border if 0) C3h set current window size BYTE #rows BYTE #cols C4h set upper left corner of viewport (portion of virtual screen displayed in window) BYTE row BYTE column C5h set size of virtual screen BYTE #rows BYTE #cols C6h unused C7h unused C8h set logical cursor relative to current position BYTE number of rows to move down (signed) BYTE number of columns to move right (signed) C9h shift top left corner of scrolling region BYTE #rows (signed) BYTE #cols (signed) CAh set window pos relative to current position BYTE number of rows to shift down (signed) BYTE number of columns to shift right (signed) CBh set window size relative to current size BYTE number of rows to expand (signed) BYTE number of cols to expand (signed) CCh shift viewport relative to current position BYTE rows to shift (signed) BYTE cols to shift (signed) CDh resize virtual screen BYTE #rows to expand (signed) BYTE #cols to expand (signed) CEh clear ??? CFh set ??? D0h turn on ??? (default) D1h turn off ??? D2h turn on ??? D3h turn off ??? (default) D4h window is visible D5h window is hidden D6h window has frame D7h window unframed D8h read characters from window (default) D9h read attributes from window DAh use logical attributes, which may be remapped attributes 1 normal text 2 highlighted normal text 3 help text 4 highlighted help text 5 error message 6 highlighted error message 7 emphasized text 8 marked text 9-16 are reverse video versions of 1-8 DBh use physical attributes for characters DCh enable special actions for control characters (default) DDh disable special control char handling, all chars displayable by BIOS TTY call DEh write both character and attribute (default) DFh write character only, leave attribute untouched E0h repeat following commands BYTE number of times E1h end of commands to repeat, start repeating them E2h set color BYTE color E3h clear virtual screen E4h redraw window E5h select menu style BYTE style bits 5,4 = 01 use two-letter menu entries for remainder of this stream E5h (panel file only) BYTE modifier bits 7,6 = 11 panel goes in new window = 01 panel uses existing window bit 5 = 1 create new keyboard in field mode bit 4 = 1 make newly-created keyboard active bits 3-0 unused ??? E6h create new window and perform rest of manipulations in new window BYTE number of rows BYTE number of columns Return: DWORD object handle returned on stack at end E7h unused E8h scroll area up (top left corner defined by opcode C1h) BYTE height BYTE width E9h scroll area down (top left corner defined by opcode C1h) BYTE height BYTE width EAh scroll area left (top left corner defined by opcode C1h) BYTE height BYTE width EBh scroll area right (top left corner defined by opcode C1h) BYTE height BYTE width ECh set logical attributes for window contents BYTE bit flags??? BYTE which attributes to set bit 7 if set, copy single following byte to indicated attrs bits 4-6 # of first attribute to change - 1 bits 0-3 # of consecutive attributes to change N BYTES new attributes EDh set logical attributes for window frame BYTE bit flags??? BYTE which attributes to set bit 7 if set, copy single following byte to indicated attrs bits 4-6 # of first attribute to change - 1 bits 0-3 # of consecutive attributes to change N BYTES new attributes attributes 1 = top left corner 2 = top right corner 3 = bottom left corner 4 = bottom right corner 5 = top edge 6 = bottom edge 7 = left edge 8 = right edge EEh set characters for window frame BYTE bit flags??? BYTE which characters to set bit 7 if set, copy single following byte to indicated chars bits 4-6 # of first char to change - 1 bits 0-3 # of consecutive chars to change N BYTES new chars (same relative position as attributes above) EFh set window name BYTE length of name N BYTES name F0h clear input field to blanks BYTE field number F1h fill input field with character BYTE field number BYTE char F2h set color of input field BYTE field number (1-N) BYTE attribute F3h set initial contents of input field BYTE field number (1-N) N BYTES enough chars to exactly fill field as defined by op FFh F4h position cursor to specific input field BYTE field number (1-N) F5h change field table entry BYTE field number 7-8 BYTEs field table entry (see FFh below) F6h set field type BYTE field number BYTE type F7h ??? N BYTES (one for each field???) F8h scroll field up a line BYTE field number F9h scroll field down a line BYTE field number FAh scroll field left BYTE field number FBh scroll field right BYTE field number FCh set field table header BYTE number of fields BYTE screen behavior bits bit 7 ??? bit 6 set if menu items may be selected via keyboard bit 5 set if left mouse button may terminate entry bit 4 set if right mouse button may terminate entry bit 3 if set, menu fields return ' ' rather than 'Y' or 'N' bit 2 ??? bits 0,1 = 00 no data returned on read of keyboard 01 data returned as array of chars containing all fields packed together, with menu fields represented by the character 'Y' if selected and 'N' if not selected 10 data returned as variable-length records for all fields 11 data returned as variable-length records for the fields which were modified BYTE field in which cursor was when entry was terminated (updated by DESQview) BYTE field in which mouse was when entry was terminated (updated by DESQview) BYTE color of field currently pointed to during entry BYTE color of input fields which have been selected FDh reset modified bit for all fields FEh reset selected and modified bits for all fields FFh set up input fields 6 BYTES table header (see FCh above) the field table entries, one for each field BYTE start row \ BYTE start column \ if menu selection and start is to BYTE end row / right or below end, select from kbd only BYTE end column / BYTE field type bits 7,6 = 00 non-entry field 01 echos keystrokes input to make menu selection 10 fill-in field 11 menu selection bit 5 ??? bit 4 ??? bit 3 ??? bit 2 ??? bit 1 set if field selected bit 0 set if field modified BYTE modifier if type is fill-in, then bit flags to determine behavior bit 7 if set, beep when field is full bit 6 move to next field when current field is full bit 5 if set, enter text from right end (for numbers) bit 4 if set, force input to uppercase bit 3 if set, clear old contents on first keystroke bit 2 ??? bit 1 ??? bit 0 ??? if type is menu selection, first key to press to activate 00h if have to point-&-click or is an extended-ASCII keystroke (only if two-key menus enabled) BYTE for menu item, color of field after cursor or mouse passes through it BYTE second key for activating menu selection if field type is C0h (0 = only single key). This byte is present iff two-letter menu entries selected with opcode E5h, and in that case is present regardless of field type Note: DESQview uses and updates the actual copy of the information which is contained in the stream. Thus this info must remain intact until after the data entry is complete. MODE 01h "QUERY STREAM" (valid only for those opcodes listed here) A0h return logical cursor row in next byte A1h return logical cursor column in next byte A2h return top row of scrolling region in next byte A3h return left column of scrolling region in next byte A4h return row of physical window origin in next byte A5h return column of physical window origin in next byte A6h return height of physcial window in next byte A7h return width of physical window in next byte A8h return row of viewport origin in next byte A9h return column of viewport origin in next byte AAh return height of virtual screen in next byte ABh return width of virtual screen in next byte AFh return ??? in next byte C0h return current logical cursor position in next two bytes C1h return top left corner of scrolling region in next two bytes C2h return current window position in next two bytes C3h return current window size in next two bytes C4h return current viewport origin in next two bytes C5h return current virtual screen size in next two bytes D0h \ overwritten with D0h if ??? on D1h / D1h if ??? off D2h \ overwritten with D2h if ??? on D3h / D3h if ??? off D4h \ overwritten with D4h if window visible D5h / D5h if window hidden D6h \ overwritten with D6h if window has frame D7h / D7h if window unframed D8h \ overwritten with D8h if reading characters from window D9h / D9h if reading attributes from window DAh \ overwritten with DAh if using logical attributes DBh / DBh if using physical attributes DCh \ overwritten with DCh if TTY control char interpretation on DDh / DDh if TTY control char interpretation off DEh \ overwritten with DEh if writing both characters and attributes DFh / DFh if leaving attributes untouched E2h return current color in next byte ECh get logical attributes for window contents BYTE ??? BYTE which attributes to get bit 7 ??? bits 4-6 first attribute to get - 1 bits 0-3 # consecutive attributes N BYTES buffer to hold attributes EDh get logical attributes for window frame BYTE ??? BYTE which attributes to get bit 7 ??? bits 4-6 first attribute to get - 1 bits 0-3 # consecutive attributes N BYTES buffer to hold attributes EEh get characters for window frame BYTE ??? BYTE which attributes to get bit 7 ??? bits 4-6 first char to get - 1 bits 0-3 # consecutive chars N BYTES buffer to hold chars EFh return current window name BYTE max length of returned name N BYTES buffer to hold window name F3h return contents of input field BYTE field number N BYTES buffer to hold field contents (size exactly equal to field size) F5h get field table entry BYTE field number 7-8 BYTES buffer to hold field table entry F6h get type of a field BYTE field number BYTE type FCh get field table header 6 BYTES buffer to store header MODE 10h "MANAGER STREAM" (valid only for opcodes listed here) 00h allow window to be moved horizontally 01h allow window to be moved vertically 02h allow window to change width 03h allow window to change height 04h allow window to be scrolled horizontally 05h allow window to be scrolled vertically 06h allow "Close Window" menu selection 07h allow window to be hidden 08h allow "Mark" menu 0Eh allow "Scissors" menu 10h allow DESQview main menu to be popped up 11h allow "Switch Windows" menu 12h allow "Open Window" menu 13h allow "Quit" menu selection 20h-33h opposite of 00h-13h, disallow specified action 40h notify if horizontal position of window changes 41h notify if vertical position of window changes 42h notify if width of window changes 43h notify if height of window changes 44h notify if window scrolled horizontally 45h notify if window scrolled vertically 46h notify if window is closed--program has to clean up and exit itself 47h notify if window is hidden 48h notify if "?" on main menu selected 49h notify if colors changed??? (guess) 4Ah notify if window is made active 4Bh notify if window is switched away from 4Ch notify if video mode changes 4Dh notify if "Scissors" menu "Cut" option selected 4Eh notify if "Scissors" menu "Copy" option selected 4Fh notify if "Scissors" menu "Paste" option selected 50h notify if DESQview main menu popped up 51h notify if DESQview main menu popped down 60h-71h opposite of 40h-51h: don't notify on specified event 84h attach window to parent task's window (both move together) 85h detach window from parent task's window (may move independently) 86h disable background operation 87h enable running in background 88h set minimum size of physical window BYTE rows BYTE columns 89h set maximum size of physical window BYTE rows BYTE cols 8Ah set primary asynchronous notification routine DWORD address of routine, 0000:0000 means none on entry ES:DI = handle of window, DS:SI is secondary routine mailbox contains message indicating event Opcode 40h horizontal movement DWORD object handle of window BYTE new row BYTE new col 41h vertical movement DWORD object handle of window BYTE new row BYTE new col 42h horizontal size change DWORD object handle of window BYTE new rows BYTE new cols 43h vertical size change DWORD object handle of window BYTE new rows BYTE new cols 44h scrolled horizontally DWORD object handle of window BYTE upper left row visible BYTE upper left column visible BYTE ??? BYTE amount moved: >0 right, <0 left, 0 done 45h scrolled vertically DWORD object hande of window BYTE upper left row visible BYTE upper left column visible BYTE ??? BYTE amount moved: >0 down, <0 up, 0 done 46h window closed DWORD object handle of window BYTE mouse pointer row BYTE mouse pointer column BYTE ??? 47h window hidden 48h Help for Program selected DWORD object handle of window BYTE mouse pointer row BYTE mouse pointer column BYTE ??? 49h colors changed??? (guess) 4Ah switched to window from another ("raise") 4Bh switched away from the window ("lower") 4Ch video mode changed BYTE new video mode 4Dh Scissors/cUt selected DWORD object handle of window BYTE row of upper left corner BYTE column of upper left corner BYTE ??? DWORD handle of mailbox to write??? BYTE height of region BYTE width of region 4Eh Scissors/Copy selected DWORD object handle of window BYTE row of upper left corner BYTE column of upper left corner BYTE ??? DWORD handle of mailbox to write??? BYTE height of region BYTE width of region 4Fh Scissors/Paste selected DWORD object handle of window BYTE row of upper left corner BYTE column of upper left corner BYTE ??? DWORD handle of mailbox to read BYTE height of region BYTE width of region 50h main menu popped up 51h main menu popped down routine should restore all registers before returning 8Bh set secondary async notification routine DWORD address of routine, passed to primary routine in DS:SI, --