]>
wirehaze git hosting - MS-DOS.git/blob - v2.0/source/FORMAT.ASM
1 ;***************************************************************
3 ; 86-DOS FORMAT DISK UTILITY
5 ; This routine formats a new disk,clears the FAT and DIRECTORY
6 ; then optionally copies the SYSTEM and COMMAND.COM to this
9 ; SYNTAX: FORMAT [drive][/switch1][/switch2]...[/switch16]
11 ; Regardless of the drive designator , the user will be
12 ; prompted to insert the diskette to be formatted.
14 ;***************************************************************
16 ;Mod to ask for volume ID ARR 5/12/82
17 ; 05/19/82 Fixed rounding bug in CLUSCAL: ARR
19 ; Added rev number message
20 ; Added dir attribute to DELALL FCB
24 ; 5/1/83 ARR Re-do to transfer system on small memory systems
29 IBMJAPVER EQU FALSE
; SET ONLY ONE SWITCH TO TRUE!
40 ;FORMAT Pre-defined switches
41 SYSSW EQU
1 ; System transfer
42 VOLSW EQU
2 ; Volume ID prompt
43 OLDSW EQU
4 ; E5 dir terminator
48 RECLEN EQU fcb_RECSIZ
+7
51 ;Per system file data structure
54 FILE_HANDLE
DW ?
; Source handle
55 FILE_SIZEP
DW ?
; File size in para
56 FILE_SIZEB
DD ?
; File size in bytes
57 FILE_OFFSET
DD ?
; Offset in file (partial)
58 FILE_START
DW ?
; Para number of start in buffer
59 FILE_DATE
DW ?
; Date of file
60 FILE_TIME
DW ?
; Time of file
61 FILE_NAME
DB ?
; Start of name
64 CODE SEGMENT PUBLIC 'CODE'
66 ASSUME
CS:CODE,DS:CODE,ES:CODE
71 PUBLIC SWITCHMAP
,DRIVE
72 EXTRN HARDFLAG
:BYTE ;0 = REMOVABLE MEDIA
73 EXTRN SWITCHLIST
:BYTE,FATID
:BYTE,FATSPACE
:WORD
74 EXTRN STARTSECTOR
:WORD,FREESPACE
:WORD,INIT
:NEAR
75 EXTRN DISKFORMAT
:NEAR,BADSECTOR
:NEAR,DONE
:NEAR
79 EXTRN WAITYN
:NEAR,REPORT
:NEAR
80 PUBLIC PRINT
,CRLF
,DISP32BITS
,UNSCALE
,FDSKSIZ
,SECSIZ
,CLUSSIZ
89 MOV SP,OFFSET
STACK ;Use internal stack
93 ; MOV DX,OFFSET HEADER
97 DOSVER_HIGH EQU
020BH ;2.11 in hex
98 PUSH AX ;Save DRIVE validity info
101 XCHG AH,AL ;Turn it around to AH.AL
106 MOV AH,STD_CON_STRING_OUTPUT
112 IF IBMVER
; IBM WANTS TO CHECK FOR ASSIGN.COM
138 CMP AL,0FFH ;See if invalid drive specified
139 JNZ DRVGD
;If not proceed
140 MOV DX,OFFSET INVDRV
;Invalid drive message
141 CALL PRINT
;Print the message
144 MOV AH,GET_DEFAULT_DRIVE
;Must get the default drive
145 INT 21H
;Default now in AL
146 MOV DEFALT
,AL ;Save for later
152 MOV SI,DRNUM
;So we can get our parameters
153 LODSB ;Fetch drive designation
154 OR AL,AL ;See if specified
155 JNZ DRVSPEC
;If specfied proceed
159 DEC AL ;Drive designator now correct
160 MOV BYTE PTR DS:[DRNUM
],AL ;And updated
161 MOV DRIVE
,AL ;Save copy
163 MOV AH,SET_INTERRUPT_VECTOR
165 INT 21H
;Set ^C vector
166 ;Get all the swith information from the command line
168 MOV AH,CHAR_OPER
;GET SWITCH CHARACTER
169 INT 21H
;CALL THE DOS
172 XOR BX,BX ;Store switch information in BX
173 MOV SI,81H
;Point to the command line buffer
181 LODSB ;Get next character
182 CMP AL,":" ;Is it a drive specifier?
183 JNZ INVALID
;No -- invalid parameter
184 CMP BYTE PTR DBLFLG
,0 ;Is is the only drive specifier we've seen
185 JNZ INVALID
;No -- invalid parameter
186 INC BYTE PTR DBLFLG
;Yes -- set the flag
190 ;Convert any lower case input into upper case
192 JL GETCHR
;Switch is a digit don't try to convert it
195 MOV CL,SWITCHLIST
;Number of legal switches
196 OR CL,CL ;If it's none we shouldn't be here
197 JZ INVALID
;Report the error
199 MOV DI,1+OFFSET SWITCHLIST
;Point to the legal switch characters
204 OR BX,AX ;Set the appropriate bit in SWITCHMAP
205 JMP SHORT NXTSWT
;See if there are anymore
229 IF IBMVER
;/B SWITCH TURNS /8 ON AND /S OFF
232 AND BX,NOT SYSSW
;TURN OFF /S
233 OR BX,00010000B ;TURN ON /8
261 INT 21H
;Go to root on default drive (source)
264 CALL READDOS
;Read BIOS and DOS
265 JNC INITCALL
;OK -- read next file
267 CALL SYSPRM
;Prompt for system disk
268 JMP RDFRST
;Try again
271 CALL INIT
;Let OEM read any files before disk is changed
273 MOV DX,OFFSET FRMTERR
282 MOV WORD PTR BADSIZ
,0 ;Must intialize for each iteration
283 MOV WORD PTR BADSIZ
+2,0
284 MOV WORD PTR SYSSIZ
,0
285 MOV WORD PTR SYSSIZ
+2,0
286 MOV BYTE PTR DBLFLG
,0
287 MOV BYTE PTR CLEARFLG
,0
289 MOV SWITCHMAP
,DX ;Restore original Switches
290 MOV AL,DRIVE
;Fetch drive
291 ADD AL,"A" ;(AL)= ASCII designation
292 MOV BYTE PTR SNGDRV
,AL ;Fill out the message
293 MOV BYTE PTR TARGDRV
,AL
294 MOV BYTE PTR HRDDRV
,AL
295 CALL DSKPRM
;Prompt for new disk
296 CALL DISKFORMAT
;Format the disk
299 MOV DX,OFFSET FRMTERR
303 ;Mark any bad sectors in the FATs
304 ;And keep track of how many bytes there are in bad sectors
307 CALL BADSECTOR
;Do bad track fix-up
308 JC FRMTPROB
;Had an error in Formatting - can't recover
309 CMP AX,0 ;Are we finished?
310 JNZ TRKFND
;No - check error conditions
313 CMP BX,STARTSECTOR
;Are any sectors in the system area bad?
315 MOV DX,OFFSET NOUSE
;Can't build FATs of Directory
317 JMP FRMTPROB
;Bad disk -- try again
319 MOV SECTORS
,AX ;Save the number of sectors on the track
320 CMP BYTE PTR CLEARFLG
,0 ;Have we already cleared the FAT and DIR?
321 JNZ SYSTEST
;Yes - all set
322 INC CLEARFLG
;Set the flag
324 CALL CLEAR
;Fix-up fat and directory
327 TEST SWITCHMAP
,SYSSW
;If system requested calculate size
329 CMP BYTE PTR DBLFLG
,0 ;Have we already calculated System space?
330 JNZ CMPTRKS
;Yes -- all ready for the compare
331 INC BYTE PTR DBLFLG
;No -- set the flag
332 CALL GETSIZE
;Calculate the system size
333 MOV DX,WORD PTR SYSSIZ
+2
334 MOV AX,WORD PTR SYSSIZ
337 MOV SYSTRKS
,AX ;Space FAT,Dir,and system files require
341 MOV DX,OFFSET NOTSYS
;Can't transfer a system
343 AND SWITCHMAP
,NOT SYSSW
;Turn off system transfer switch
344 MOV WORD PTR SYSSIZ
+2,0 ;No system to transfer
345 MOV WORD PTR SYSSIZ
,0 ;No system to transfer
347 ; BX is the first bad sector #, SECTORS is the number of bad sectors starting
348 ; at BX. This needs to be converted to clusters. The start sector number may
349 ; need to be rounded down to a cluster boundry, the end sector may need to be
350 ; rounded up to a cluster boundry. Know BX >= STARTSECTOR
351 SUB BX,STARTSECTOR
; BX is now DATA area relative
354 DEC CX ; CX is now the last bad sector #
358 MOV BX,AX ; BX is rounded down and converted
359 ; to a cluster #. Where cluster 0 =
360 ; first cluster of data. First bad
361 ; Sector is in cluster BX.
365 MOV CX,AX ; CX is rounded up and converted to a
366 ; to a cluster #. Where cluster 0 =
367 ; first cluster of data. Last bad
368 ; Sector is in cluster CX.
370 INC CX ; CX is number of clusters to mark bad
371 ADD BX,2 ; Bias start by correct amount since
372 ; first cluster of data is really
374 MOV AX,CLUSSIZ
; Sectors/Cluster
375 MUL SECSIZ
; Times Bytes/Sector
376 MOV BP,AX ; = Bytes/Cluster
378 ; Mark CX clusters bad starting at cluster BX
380 MOV DX,0FF7H ;0FF7H indicates a bad sector
381 CALL PACK
;Put it in the allocation map
382 CMP DX,DI ;Have we already marked it bad?
383 JZ BAD150
;if so, don't add it in
384 ADD WORD PTR BADSIZ
,BP ;Add in number of bad bytes
386 INC WORD PTR BADSIZ
+2
389 LOOP PACKIT
;Continue for # of clusters
396 ;The data is stored in the FAT at the given cluster.
398 ;DI contains the former contents
399 ;No other registers affected
421 AND DI,00FFFH ;DI CONTAINS FORMER CONTENTS
430 CMP BYTE PTR CLEARFLG
,0
432 CALL CLEAR
;Clear the FAT and Dir
433 TEST SWITCHMAP
,SYSSW
;If system requested, calculate size
435 CMP BYTE PTR DBLFLG
,0 ;Have we already calculated System space?
437 INC BYTE PTR DBLFLG
;No -- set the flag
438 CALL GETSIZE
;Calculate the system size
448 TEST SWITCHMAP
,SYSSW
;System desired
450 CALL WRITEDOS
;Write the BIOS & DOS
452 MOV DX,OFFSET NOTSYS
;Can't transfer a system
454 MOV WORD PTR SYSSIZ
+2,0 ;No system transfered
455 MOV WORD PTR SYSSIZ
,0 ;No system transfered
459 MOV DX,OFFSET SYSTRAN
466 CALL DONE
;Final call to OEM module
468 JMP FRMTPROB
;Report an error
473 CALL MORE
;See if more disks to format
474 JMP SYSLOOP
;If we returned from MORE then continue
493 ; Conversion complete. Print 8-digit number with 2 leading blanks.
529 MOV AH,STD_CON_OUTPUT
550 ;******************************************
551 ; Calculate the size in bytes of the system rounded up to sector and
552 ; cluster boundries, Answer in SYSSIZ
555 MOV AX,WORD PTR BIOSSIZB
;And calculate the system size
556 MOV DX,WORD PTR BIOSSIZB
+2
558 MOV AX,WORD PTR DOSSIZB
559 MOV DX,WORD PTR DOSSIZB
+2
561 MOV AX,WORD PTR COMSIZB
562 MOV DX,WORD PTR COMSIZB
+2
564 ;Calculate the number of sectors used for the system
569 INC AX ; Round up to next sector
579 ADD AX,DX ; Round up sector count to cluster
582 MUL SECSIZ
; Turn it back into bytes
583 ADD WORD PTR SYSSIZ
,AX
584 ADC WORD PTR SYSSIZ
+2,DX
587 PRINT: MOV AH,STD_CON_STRING_OUTPUT
;Print msg pointed to by DX
591 MORE: CMP BYTE PTR [HARDFLAG
],0 ;Check if removable media
593 CALL WAITYN
;Get yes or no response
594 JB FEXIT
;Exit if CF=1
597 MOV DX,OFFSET CRLFMSG
601 PERROR: CALL PRINT
;Print message and exit
603 CALL RESTUDIR
;Restore users dirs
607 ;Prompt the user for a system diskette in the default drive
609 MOV AH,GET_DEFAULT_DRIVE
;Will find out the default drive
610 INT 21H
;Default now in AL
611 IF IBMVER
OR IBMJAPVER
614 ADD AL,41H
;Now in Ascii
615 MOV SYSDRV
,AL ;Text now ok
617 IF IBMVER
OR IBMJAPVER
618 INT 11H
;Make sure drive has insertable media
629 MOV BYTE PTR [SYSDRV
],AL
637 CALL PRINT
;Print first line
638 CALL WAITKY
;Wait for a key
643 MOV DX,OFFSET TARGMSG
644 CALL PRINT
;Print first line
645 CALL WAITKY
;Wait for a key
650 MOV DX,OFFSET SNGMSG
;Point to the message
651 CMP BYTE PTR [HARDFLAG
],0 ;Check if removable media
655 CALL PRINT
;Print the message
656 CALL WAITKY
;Wait for space bar
661 ;Will wait for any key to be depressed.
663 MOV AX,(STD_CON_INPUT_FLUSH
SHL 8) OR STD_CON_INPUT_NO_ECHO
665 MOV AX,(STD_CON_INPUT_FLUSH
SHL 8) + 0
677 MOV DX,WORD PTR [BX+13]
679 MOV AL,BYTE PTR [BX+4]
681 MOV CX,WORD PTR [BX+2]
689 ;Clear the FAT and directory and set Dirty byte in the FAT
692 OR AL,0F8H ;Make sure it's a legal value
696 MOV BYTE PTR[DI+2],AH
703 MOV DL,[DRIVE
] ;GET THE DRIVE PARAMETER
708 MOV DPB_FIRST_ACCESS
[BX],-1 ;FORCE MEDIA CHANGE
713 MOV WORD PTR FDSKSIZ
,DX
721 ADD DX,WORD PTR FDSKSIZ
733 MOV DX,OFFSET ROOTSTR
735 INT 21H
;Go to root on target drive
740 MOV DX,OFFSET ALLFILE
743 TEST SWITCHMAP
,OLDSW
;See if E5 terminated DIR requested
747 MOV BYTE PTR CLEANFILE
,AL ;Get the drive
748 MOV DX,OFFSET CLEANFILE
755 CMP BYTE PTR CLNNAM
,"Z" + 1
757 MOV BYTE PTR CLNNAM
,"A"
758 INC BYTE PTR CLNNAM
+ 1
759 CMP BYTE PTR CLNNAM
+ 1,"Z" + 1
761 MOV BYTE PTR CLNNAM
+ 1,"A"
762 INC BYTE PTR CLNNAM
+ 2
766 MOV WORD PTR CLNNAM
,"??"
767 MOV BYTE PTR CLNNAM
+ 2,"?"
774 ;*****************************************
775 ; Process V switch if set
778 TEST [SWITCHMAP
],VOLSW
793 MOV DS:BYTE PTR[VOLFCB
+7],AL
794 MOV DX,OFFSET LABPRMT
797 MOV AH,STD_CON_STRING_INPUT
799 MOV DX,OFFSET CRLFMSG
801 MOV DX,OFFSET CRLFMSG
807 MOV SI,OFFSET INBUFF
+2
822 MOV DX,OFFSET INVCHR
;PRINT INVALID CHARS MESSAGE
837 ;****************************************
838 ;Copy IO.SYS, MSDOS.SYS and COMMAND.COM into data area.
839 ; Carry set if problems
847 MOV BYTE PTR [FILSTAT
],0
851 ADD DX,[MSIZE
] ; CX first bad para
857 MOV BYTE PTR [FILSTAT
],00000001B ; Got part of BIOS
868 MOV AX,(LSEEK
SHL 8) OR 1
870 MOV WORD PTR [BIOSOFFS
],AX
871 MOV WORD PTR [BIOSOFFS
+2],DX
881 MOV BYTE PTR [FILSTAT
],00000010B ; Got all of BIOS
891 CMP AX,DX ; No room left?
897 OR BYTE PTR [FILSTAT
],00000100B ; Got part of DOS
909 MOV AX,(LSEEK
SHL 8) OR 1
911 MOV WORD PTR [DOSOFFS
],AX
912 MOV WORD PTR [DOSOFFS
+2],DX
916 OR BYTE PTR [FILSTAT
],00001000B ; Got all of DOS
926 CMP AX,DX ; No room left?
932 OR BYTE PTR [FILSTAT
],00010000B ; Got part of COMMAND
944 MOV AX,(LSEEK
SHL 8) OR 1
946 MOV WORD PTR [COMOFFS
],AX
947 MOV WORD PTR [COMOFFS
+2],DX
951 OR BYTE PTR [FILSTAT
],00100000B ; Got all of COMMAND
960 ;**************************************************
961 ;Write BIOS DOS COMMAND to the newly formatted disk.
965 MOV DX,OFFSET BIOSFIL
974 TEST BYTE PTR FILSTAT
,00000010B
978 MOV WORD PTR [IOCNT
],SI
979 MOV WORD PTR [IOCNT
+2],DI
980 MOV BP,OFFSET BIOSData
1006 TEST BYTE PTR FILSTAT
,00001000B
1008 MOV BP,OFFSET DOSData
1009 TEST BYTE PTR FILSTAT
,00000100B
1011 MOV WORD PTR [DOSOFFS
],0
1012 MOV WORD PTR [DOSOFFS
+2],0
1020 MOV WORD PTR [IOCNT
],SI
1021 MOV WORD PTR [IOCNT
+2],DI
1039 MOV DX,OFFSET COMFIL
1048 TEST BYTE PTR FILSTAT
,00100000B
1050 MOV BP,OFFSET COMData
1051 TEST BYTE PTR FILSTAT
,00010000B
1053 MOV WORD PTR [COMOFFS
],0
1054 MOV WORD PTR [COMOFFS
+2],0
1062 MOV WORD PTR [IOCNT
],SI
1063 MOV WORD PTR [IOCNT
+2],DI
1080 CMP BYTE PTR [FILSTAT
],00101010B
1083 CALL READDOS
; Start back with BIOS
1085 CALL SYSPRM
;Prompt for system disk
1086 JMP RDFRST2
;Try again
1091 ;*********************************************
1092 ; Create a file on target disk
1093 ; CX = attributes, DX points to name
1094 ; DI:SI is size file is to have
1096 ; There is a bug in DOS 2.00 and 2.01 having to do with writes
1097 ; from the end of memory. In order to circumvent it this routine
1098 ; must create files with the length in DI:SI
1100 ; On return BX is handle, carry set if problem
1115 INT 21H
; Seek to eventual EOF
1118 INT 21H
; Set size of file to position
1122 INT 21H
; Seek back to start
1126 ;*********************************************
1127 ; Close a file on the target disk
1128 ; CX/DX is time/date, BX is handle
1131 MOV AX,(FILE_TIMES
SHL 8) OR 1
1139 MOV SI,OFFSET USERDIRS
1140 MOV BYTE PTR [SI],'\'
1148 TEST SWITCHMAP,SYSSW
1150 MOV DX,OFFSET USERDIRS
1152 INT 21H ; Restore users DIR
1160 ;****************************************
1161 ; Transfer system files
1162 ; BP points to data structure for file involved
1163 ; offset is set to current amount read in
1164 ; Start set to start of file in buffer
1165 ; TempHandle is handle to write to on target
1173 CALL TARGPRM ;Get target disk
1176 ;Enter here if some of file is already in buffer, IOCNT must be set
1177 ; to size already in buffer.
1179 MOV SI,WORD PTR [IOCNT]
1180 MOV DI,WORD PTR [IOCNT+2]
1181 MOV DS,[BP.FILE_START]
1183 CALL WRITEFILE ; Write next part
1189 LES AX,[BP.FILE_OFFSET]
1190 CMP AX,WORD PTR [BP.FILE_SIZEB]
1193 CMP AX,WORD PTR [BP.FILE_SIZEB+2]
1195 RET ; Carry clear from CMP
1198 ;Enter here if none of file is in buffer
1199 MOV AX,[MSTART] ; Furthur IO done starting here
1200 MOV [BP.FILE_START],AX
1207 CALL SYSPRM ;Prompt for system disk
1211 MOV BX,[BP.FILE_HANDLE]
1212 LES DX,[BP.FILE_OFFSET]
1218 LES SI,[BP.FILE_SIZEB]
1221 SBB DI,CX ; DI:SI is #bytes to go
1236 MOV WORD PTR [IOCNT],SI
1237 MOV WORD PTR [IOCNT+2],DI
1248 MOV AX,(LSEEK SHL 8) OR 1
1250 MOV WORD PTR [BP.FILE_OFFSET],AX
1251 MOV WORD PTR [BP.FILE_OFFSET+2],DX
1255 ;*************************************************
1256 ; Test to see if correct system disk. Open handles
1260 MOV DX,OFFSET BIOSFIL
1282 MOV WORD PTR [BIOSSIZB],SI
1283 MOV WORD PTR [BIOSSIZB+2],DI
1287 MOV DX,OFFSET DOSFIL
1308 MOV WORD PTR [DOSSIZB],SI
1309 MOV WORD PTR [DOSSIZB+2],DI
1313 MOV DX,OFFSET COMFIL
1331 MOV WORD PTR [COMSIZB],SI
1332 MOV WORD PTR [COMSIZB+2],DI
1338 ;*******************************************
1339 ; Handle in BX, return file size in para in AX
1340 ; File size in bytes DI:SI, file date in DX, file
1344 MOV AX,(LSEEK SHL 8) OR 2
1350 ADD AX,15 ; Para round up
1352 AND DX,0FH ; If the file is larger than this
1353 ; it is bigger than the 8086 address space!
1364 MOV AX,FILE_TIMES SHL 8
1369 ;********************************************
1372 ; DI:SI is byte count to I/O
1374 ; Carry set if screw up
1377 ; I/O 64K - 1 bytes DI times
1383 ; Must preserve AX,DX
1413 CMP AX,CX ; If not =, AX<CX, carry set.
1424 CMP AX,CX ; If not =, AX<CX, carry set.
1439 CMP AX,CX ; If not =, AX<CX, carry set.
1449 CMP AX,CX ; If not =, AX<CX, carry set.
1451 CALL NORMALIZE ; Clears carry
1461 ;*********************************
1462 ; Shift DI:SI left 4 bits
1471 ;*********************************
1472 ; Shift DI:SI right 4 bits
1481 ;********************************
1496 AND DX,0FH ; Clears carry
1503 DBLFLG DB 0 ;Initialize flags to zero
1506 DEFALT DB 0 ;Default drive
1508 MSTART DW ? ; Start of sys file buffer (para#)
1509 MSIZE DW ? ; Size of above in paragraphs
1511 FILSTAT DB ? ; In memory status of files
1512 ; XXXXXX00B BIOS not in
1513 ; XXXXXX01B BIOS partly in
1514 ; XXXXXX10B BIOS all in
1515 ; XXXX00XXB DOS not in
1516 ; XXXX01XXB DOS partly in
1517 ; XXXX10XXB DOS all in
1518 ; XX00XXXXB COMMAND not in
1519 ; XX01XXXXB COMMAND partly in
1520 ; XX10XXXXB COMMAND all in
1522 USERDIRS DB DIRSTRLEN+3 DUP(?) ; Storage for users current directory
1530 BDATE DW 0 ;IO system date stored here
1531 BTIME DW 0 ;IO system time stored here
1533 BIOSATT EQU attr_hidden + attr_system + attr_read_only
1537 IF IBMVER OR IBMJAPVER
1551 DDATE DW 0 ;DOS date stored here
1552 DTIME DW 0 ;DOS time
1554 DOSATT EQU attr_hidden + attr_system + attr_read_only
1558 IF IBMVER OR IBMJAPVER
1572 CDATE DW 0 ;Date of COMMAND
1573 CTIME DW 0 ;Time of COMMAND
1578 DB "X:\COMMAND.COM",0
1580 VOLFCB DB -1,0,0,0,0,0,8
1586 ALLFILE DB -1,0,0,0,0,0,0FFH
1587 ALLDRV DB 0,"???????????"
1591 CLNNAM DB "AAAFFFFFFOR"
1614 EXTRN BADVER:BYTE,SNGMSG:BYTE,SNGDRV:BYTE,HRDMSG:BYTE,HRDDRV:BYTE
1615 EXTRN LABPRMT:BYTE,TARGMSG:BYTE,TARGDRV:BYTE
1616 EXTRN SYSTRAN:BYTE,CRLFMSG:BYTE,INVCHR:BYTE,INVDRV:BYTE
1617 EXTRN SYSMSG:BYTE,SYSDRV:BYTE,FRMTERR:BYTE,NOTSYS:BYTE
1618 EXTRN NOUSE:BYTE,MEMEX:BYTE,INVPAR:BYTE
1627 \1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a