diff options
Diffstat (limited to 'v4.0/src/CMD/FORMAT/DISPLAY.ASM')
| -rw-r--r-- | v4.0/src/CMD/FORMAT/DISPLAY.ASM | 177 |
1 files changed, 177 insertions, 0 deletions
diff --git a/v4.0/src/CMD/FORMAT/DISPLAY.ASM b/v4.0/src/CMD/FORMAT/DISPLAY.ASM new file mode 100644 index 0000000..10ea538 --- /dev/null +++ b/v4.0/src/CMD/FORMAT/DISPLAY.ASM | |||
| @@ -0,0 +1,177 @@ | |||
| 1 | ; | ||
| 2 | |||
| 3 | ;***************************************************************************** | ||
| 4 | ;***************************************************************************** | ||
| 5 | ;UTILITY NAME: FORMAT.COM | ||
| 6 | ; | ||
| 7 | ;MODULE NAME: DISPLAY.ASM | ||
| 8 | ; | ||
| 9 | ; | ||
| 10 | ; Change List: AN000 - New code DOS 3.3 spec additions | ||
| 11 | ; AC000 - Changed code DOS 3.3 spec additions | ||
| 12 | ;***************************************************************************** | ||
| 13 | ;***************************************************************************** | ||
| 14 | |||
| 15 | |||
| 16 | ; | ||
| 17 | ;***************************************************************************** | ||
| 18 | ; Define Segment ordering | ||
| 19 | ;***************************************************************************** | ||
| 20 | ; | ||
| 21 | |||
| 22 | |||
| 23 | .SEQ ; | ||
| 24 | |||
| 25 | PSP segment public para 'DUMMY' | ||
| 26 | PSP ends | ||
| 27 | |||
| 28 | data segment public para 'DATA' ; | ||
| 29 | Public Test_Data_Start | ||
| 30 | Test_Data_Start label byte | ||
| 31 | data ends ; | ||
| 32 | |||
| 33 | stack segment para stack | ||
| 34 | db 62 dup ("-Stack!-") ; (362-80h) is the additionsal IBM ROM | ||
| 35 | assume ss:stack | ||
| 36 | stack ends | ||
| 37 | |||
| 38 | |||
| 39 | code segment public para 'CODE' ; | ||
| 40 | assume cs:code,ds:data ; | ||
| 41 | code ends | ||
| 42 | |||
| 43 | End_Of_Memory segment public para 'BUFFERS' ; | ||
| 44 | Public Test_End | ||
| 45 | Test_End label byte | ||
| 46 | End_Of_Memory ends ; | ||
| 47 | |||
| 48 | |||
| 49 | ; | ||
| 50 | ;***************************************************************************** | ||
| 51 | ; INCLUDE FILES | ||
| 52 | ;***************************************************************************** | ||
| 53 | ; | ||
| 54 | |||
| 55 | .xlist | ||
| 56 | INCLUDE FORCHNG.INC | ||
| 57 | INCLUDE FOREQU.INC | ||
| 58 | INCLUDE FORMSG.INC | ||
| 59 | INCLUDE SYSMSG.INC | ||
| 60 | .list | ||
| 61 | |||
| 62 | ; | ||
| 63 | ;***************************************************************************** | ||
| 64 | ; Message Services | ||
| 65 | ;***************************************************************************** | ||
| 66 | ; | ||
| 67 | |||
| 68 | |||
| 69 | MSG_UTILNAME <FORMAT> | ||
| 70 | |||
| 71 | |||
| 72 | data segment public para 'DATA' | ||
| 73 | Msg_Services <MSGDATA> | ||
| 74 | data ends | ||
| 75 | |||
| 76 | code segment public para 'CODE' | ||
| 77 | Msg_Services <NEARmsg> | ||
| 78 | Msg_Services <LOADmsg> | ||
| 79 | Msg_Services <DISPLAYmsg,CHARmsg,NUMmsg> | ||
| 80 | Msg_Services <FORMAT.CLA,FORMAT.CLB,FORMAT.CLC,FORMAT.CL1,FORMAT.CL2,FORMAT.CTL> | ||
| 81 | code ends | ||
| 82 | |||
| 83 | ; | ||
| 84 | ;***************************************************************************** | ||
| 85 | ; Public Declarations | ||
| 86 | ;***************************************************************************** | ||
| 87 | ; | ||
| 88 | |||
| 89 | Public SysDispMsg | ||
| 90 | Public SysLoadMsg | ||
| 91 | |||
| 92 | |||
| 93 | ; | ||
| 94 | ;*************************************************************************** | ||
| 95 | ; Message Structures | ||
| 96 | ;*************************************************************************** | ||
| 97 | ; | ||
| 98 | |||
| 99 | |||
| 100 | Message_Table struc ; ;AN000; | ||
| 101 | ; | ||
| 102 | Entry1 dw 0 ; ;AN000; | ||
| 103 | Entry2 dw 0 ; ;AN000; | ||
| 104 | Entry3 dw 0 ; ;AN000; | ||
| 105 | Entry4 dw 0 ; ;AN000; | ||
| 106 | Entry5 db 0 ; ;AN000; | ||
| 107 | Entry6 db 0 ; ;AN000; | ||
| 108 | Entry7 dw 0 ; ;AN000; | ||
| 109 | ; | ||
| 110 | Message_Table ends ; ;AN000; | ||
| 111 | |||
| 112 | |||
| 113 | |||
| 114 | code segment public para 'CODE' | ||
| 115 | ;***************************************************************************** | ||
| 116 | ;Routine name&gml Display_Interface | ||
| 117 | ;***************************************************************************** | ||
| 118 | ; | ||
| 119 | ;DescriptioN&gml Save all registers, set up registers required for SysDispMsg | ||
| 120 | ; routine. This information is contained in a message description | ||
| 121 | ; table pointed to by the DX register. Call SysDispMsg, then | ||
| 122 | ; restore registers. This routine assumes that the only time an | ||
| 123 | ; error will be returned is if an extended error message was | ||
| 124 | ; requested, so it will ignore error returns | ||
| 125 | ; | ||
| 126 | ;Called Procedures: Message (macro) | ||
| 127 | ; | ||
| 128 | ;Change History&gml Created 4/22/87 MT | ||
| 129 | ; | ||
| 130 | ;Input&gml ES&gmlDX = pointer to message description | ||
| 131 | ; | ||
| 132 | ;Output&gml None | ||
| 133 | ; | ||
| 134 | ;Psuedocode | ||
| 135 | ;---------- | ||
| 136 | ; | ||
| 137 | ; Save all registers | ||
| 138 | ; Setup registers for SysDispMsg from Message Description Tables | ||
| 139 | ; CALL SysDispMsg | ||
| 140 | ; Restore registers | ||
| 141 | ; ret | ||
| 142 | ;***************************************************************************** | ||
| 143 | |||
| 144 | Public Display_Interface | ||
| 145 | Display_Interface proc ; ;AN000; | ||
| 146 | |||
| 147 | push ds ; ;AN000; | ||
| 148 | push ax ;Save registers ;AN000; | ||
| 149 | push bx ; " " " " ;AN000; | ||
| 150 | push cx ; " " " " ;AN000; | ||
| 151 | push dx ; " " " " ;AN000; | ||
| 152 | push si ; " " " " ;AN000; | ||
| 153 | push di ; " " " " ;AN000; | ||
| 154 | mov di,dx ;Change pointer to table ;AN000; | ||
| 155 | mov dx,data ;Point to data segment | ||
| 156 | mov ds,dx ; | ||
| 157 | mov ax,[di].Entry1 ;Message number ;AN000; | ||
| 158 | mov bx,[di].Entry2 ;Handle ;AN000; | ||
| 159 | mov si,[di].Entry3 ;Sublist ;AN000; | ||
| 160 | mov cx,[di].Entry4 ;Count ;AN000; | ||
| 161 | mov dh,[di].Entry5 ;Class ;AN000; | ||
| 162 | mov dl,[di].Entry6 ;Function ;AN000; | ||
| 163 | mov di,[di].Entry7 ;Input ;AN000; | ||
| 164 | call SysDispMsg ;Display the message ;AN000; | ||
| 165 | pop di ;Restore registers ;AN000; | ||
| 166 | pop si ; " " " " ;AN000; | ||
| 167 | pop dx ; " " " " ;AN000; | ||
| 168 | pop cx ; " " " " ;AN000; | ||
| 169 | pop bx ; " " " " ;AN000; | ||
| 170 | pop ax ; " " " " ;AN000; | ||
| 171 | pop ds ; ;AN000; | ||
| 172 | ret ;All done ;AN000; | ||
| 173 | |||
| 174 | Display_Interface endp ; ;AN000; | ||
| 175 | code ends | ||
| 176 | end | ||
| 177 | |||