1 ; _____________________________________________ 2 ; | | 3 ; | Project: APPLER | 4 ; | File: ABOUT.ASM | 5 ; | Compiler: 16-bit TASM (2.5) | 6 ; | | 7 ; | Subject: About Screen | 8 ; | | 9 ; | Author: Emil Dotchevski | 10 ; |_____________________________________________| 11 12 include GLOBALS.INC 13 include INTERFAC.INC 14 include CONIO.INC 15 16 About segment public 17 assume cs:About,ds:About,es:Emulate 18 19 ScreenIOParams SIO_ParamStruc <1,About,0,0,offset Screen,seg Screen,1,0,1,1> 20 GetKeyParams RK_ParamStruc <1,Fkey,0,0,0,?,ShowAll,0> 21 22 Print macro y,x,Str 23 gotoxy y,x 24 mov bx,offset Str 25 ScreenIOservice _STRINGPRINT 26 endm 27 28 29 AboutInInit proc far 30 cli 31 push ax ds es 32 mov ax,Emulate 33 mov es,ax 34 mov al,es:[C000] 35 mov cs:KeyPressed,al 36 mov es:[C000],0 37 call DebugKeysOn 38 assume ds:CONio 39 mov ax,CONio 40 mov ds,ax 41 mov SIO_ParamsOfs, offset ScreenIOParams 42 mov SIO_ParamsSeg, seg ScreenIOParams 43 mov RK_ParamsOfs, offset GetKeyParams 44 mov RK_ParamsSeg, seg GetKeyParams 45 pop es ds ax 46 call UnSetBreaks 47 sti 48 ret 49 AboutInInit endp 50 51 KeyPressed db 0 52 AboutOutInit proc far 53 cli 54 push ax es 55 mov ax,Emulate 56 mov es,ax 57 mov al,KeyPressed 58 mov es:[C000],al 59 mov ax,seg T_Iflags 60 mov es,ax 61 assume es:seg T_Iflags 62 mov byte ptr es:T_Iflags,00000010b 63 assume es:Emulate 64 pop es ax 65 call AppleKeysOn 66 call SetBreaks 67 ret 68 AboutOutInit endp 69 70 assume cs:About,ds:About,es:Emulate 71 72 AboutMainRet: push cs 73 pop ds 74 AboutLoop: call ReadKey 75 cmp al,0Ch 76 jne AboutLoop 77 call GoAppleII 78 jmp AboutLoop 79 80 81 82 Fkey proc far 83 cmp al,8 84 jne FkeyRet 85 call GoAppleII 86 FkeyRet: ret 87 Fkey endp 88 89 90 91 ShowAll proc far 92 push ax bx cx dx si bp ds 93 push cs 94 pop ds 95 call ShowTitle 96 call ShowEmulation 97 call ShowAuthors 98 call ShowDistribute 99 call ShowLicense 100 call ShowFuncKeys 101 pop ds bp si dx cx bx ax 102 ret 103 ShowAll endp 104 105 106 ; -- Draw box -------------------------- 107 ; Entry: 108 ; AH = Active Flag Bit 109 ; CX = HTAB & VTAB 110 ; BX = Offset of the strings 111 ; DL = Length of the box line - 1 112 ; DH = Number of lines - 1 113 ; Destroy: 114 ; AX,BX,CX,DX 115 DB_CX dw ? 116 DrawBox: mov ax,cx 117 add ax,80 * 2 118 mov cs:DB_CX,ax 119 mov ah,7 120 ScreenIOservice _STRINGPRINT 121 mov bx,ScreenIOparams.SP_bx 122 dec dh 123 mov al,dh 124 mov dx,cs:DB_CX 125 DB_Loop1: mov cx,dx 126 add dx,80 * 2 127 ScreenIOservice _STRINGPRINT 128 dec al 129 jnz DB_Loop1 130 mov cx,dx 131 mov bx,ScreenIOparams.SP_bx 132 ScreenIOservice _STRINGPRINT 133 ret 134 135 136 137 ST_Str db ' ABOUT APPLER ',0 138 ShowTitle: gotoxy 1,0 139 mov ah,1Fh 140 mov bx,offset ST_Str 141 ScreenIOservice _STRINGPRINT 142 gotoxy 2,0 143 xor ah,ah 144 ScreenIOservice _STRINGPRINT 145 ret 146 147 SE_Str db 'ÚEmulationÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ',0 148 db '³ ³ ',0 149 db 'ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ',0 150 SE_Str1 db 1,0Fh,'APPLER',1,7,' emulates:',0 151 SE_Str2 db 1,0Fh,'þ',1,7,' 65C02 Valid',1,0Fh,' Instructions',0 152 SE_Str3 db 1,0Fh,'þ',1,7,' APPLE ][',1,0Fh,' Video Modes',0 153 SE_Str4 db 1,0Fh,'þ',1,7,' APPLE ][',1,0Fh,' Keyboard',0 154 SE_Str5 db 1,0Fh,'þ',1,7,' APPLE ][',1,0Fh,' Internal Speaker',0 155 SE_Str6 db 1,0Fh,'þ',1,7,' APPLE ][',1,0Fh,' Floppy Disk Controller',0 156 SE_Str7 db 1,0Fh,'þ',1,7,' APPLE ][',1,0Fh,' Language Card',0 157 SE_Str8 db 1,0Fh,'þ',1,7,' APPLE ][',1,0Fh,' Digital Joystick',0 158 ShowEmulation: gotoxy 3,0 159 mov bx,offset SE_Str 160 mov dh,10 161 call DrawBox 162 print 5,2,SE_Str1 163 print 6,3,SE_Str2 164 print 7,3,SE_Str3 165 print 8,3,SE_Str4 166 print 9,3,SE_Str5 167 print 10,3,SE_Str6 168 print 11,3,SE_Str7 169 print 12,3,SE_Str8 170 ret 171 172 173 174 SA_Str db 'ÚAuthorsÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿',0 175 db '³ ³',0 176 db 'ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ',0 177 SA_Str1 db 1,0Fh,'Emil Dotchevski',0 178 SA_Str2 db 1,0Fh,'Alexander Patalenski',0 179 ShowAuthors: gotoxy 3,40 180 mov bx,offset SA_Str 181 mov dh,6 182 call DrawBox 183 print 5,43,SA_Str1 184 print 7,57,SA_Str2 185 ret 186 187 188 ifndef LICENSE_NAME 189 SD_Str db 'ÚDistributionÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿',0 190 db '³ ³',0 191 db 'ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ',0 192 SD_Str1 db 1,0Fh,'FREE:',1,7,' for non-comercial use only',0 193 else 194 SD_Str db 'ÚRegistrationÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿',0 195 db '³ ³',0 196 db 'ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ',0 197 SD_Str1 db 1,0Fh 198 db_LICENSE_NAME 199 db 0 200 endif 201 ShowDistribute: gotoxy 10,40 202 mov bx,offset SD_Str 203 mov dh,3 204 call DrawBox 205 print 12,43,SD_Str1 206 ret 207 208 209 210 SL_Str db 'ÚLicenseÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿',0 211 db '³ ³',0 212 db 'ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ',0 213 SL_Str1 db 'This is a Public Domain software: you are licensed to use and distribute',0 214 SL_Str2 db 'it absolutely free as long as no charge is made and program files are not',0 215 SL_Str3 db 'modified. Comments and bug reports are welcome.',0 216 SL_Str4 db 'Emil Dotchevski: https://github.com/zajo',0 217 SL_Str5 db 'Alexander Patalenski: alexp@unforgettable.com',0 218 SL_Str6 db 1,0Ah,'APPLE ][ FOREVER!',0 219 ShowLicense: gotoxy 14,0 220 mov bx,offset SL_Str 221 mov dh,10 222 call DrawBox 223 print 16,3,SL_Str1 224 print 17,3,SL_Str2 225 print 18,3,SL_Str3 226 print 20,3,SL_Str4 227 print 21,3,SL_Str5 228 print 23,60,SL_Str6 229 ret 230 231 232 233 SFK_Str db '1 2 3 4 5 ' 234 db '6 7 8 9 10 ',0 235 SFK_FkeysMain dw SFK_None,SFK_None,SFK_None,SFK_None,SFK_None 236 dw SFK_None,SFK_None,SFK_None,SFK_Apple,SFK_None 237 SFK_None db ' ',0 238 SFK_Apple db 1,1Fh,'Apple ',1,1Fh,0 239 240 ShowFuncKeys: gotoxy 19h,0 241 mov bx,offset SFK_Str 242 mov ah,7 243 ScreenIOservice _STRINGPRINT 244 gotoxy 19h,1 245 xor si,si 246 mov ah,1Fh 247 SFK_Loop0: mov bx,cs:SFK_FkeysMain[si] 248 ScreenIOservice _STRINGPRINT 249 add cx,4 250 add si,2 251 cmp si,20 252 jb SFK_Loop0 253 ret 254 255 GoAppleII: push ax es 256 mov ax,Emulate 257 mov es,ax 258 mov al,C050 259 ScreenIOservice _SetScreen 260 SwitchToProcess PID_EMULATOR 261 pop es ax 262 ret 263 264 About ends 265 266 END