Rev 4265 | Rev 5565 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4265 | Rev 5201 | ||
---|---|---|---|
Line 80... | Line 80... | ||
80 | of the right lower corner. This concerns all other functions too. |
80 | of the right lower corner. This concerns all other functions too. |
81 | It means, that the real sizes are on 1 pixel more. |
81 | It means, that the real sizes are on 1 pixel more. |
82 | * The window of type I looks as follows: |
82 | * The window of type I looks as follows: |
83 | * draw external frame of color indicated in edi, 1 pixel in width |
83 | * draw external frame of color indicated in edi, 1 pixel in width |
84 | * draw header - rectangle with the left upper corner (1,1) and |
84 | * draw header - rectangle with the left upper corner (1,1) and |
85 | right lower (xsize-1,min(25,ysize)) color indicated in esi |
85 | right lower (xsize-1,min(20,ysize-1)) color indicated in esi |
86 | (taking a gradient into account) |
86 | (taking a gradient into account) |
87 | * if ysize>=26, fill the working area of the window - |
87 | * if ysize>21, fill the working area of the window - |
88 | rectangle with the left upper corner (1,21) and right lower |
88 | rectangle with the left upper corner (1,21) and right lower |
89 | (xsize-1,ysize-1) (sizes (xsize-1)*(ysize-21)) with color |
89 | (xsize-1,ysize-1) (sizes (xsize-1)*(ysize-21)) with color |
90 | indicated in edx (taking a gradient into account) |
90 | indicated in edx (taking a gradient into account) |
91 | * if A=1 and caption has been already set by subfunction 1 |
91 | * if A=1 and caption has been already set by subfunction 1 |
92 | of function 71, it is drawn in the corresponding place of header |
92 | of function 71, it is drawn in the corresponding place of header |
Line 146... | Line 146... | ||
146 | Parameters: |
146 | Parameters: |
147 | * eax = 2 - function number |
147 | * eax = 2 - function number |
148 | Returned value: |
148 | Returned value: |
149 | * if the buffer is empty, function returns eax=1 |
149 | * if the buffer is empty, function returns eax=1 |
150 | * if the buffer is not empty, function returns al=0, |
150 | * if the buffer is not empty, function returns al=0, |
151 | ah=code of the pressed key, high word of eax is zero |
151 | ah=code of the pressed key, |
- | 152 | bits 16-23 = contain scancode for pressed key in ASCII mode, |
|
- | 153 | in the scancodes mode this bits cleared. |
|
- | 154 | bits 23-31 = zero |
|
152 | * if there is "hotkey", function returns al=2, |
155 | * if there is "hotkey", function returns al=2, |
153 | ah=scancode of the pressed key (0 for control keys), |
156 | ah=scancode of the pressed key (0 for control keys), |
154 | high word of eax contains a status of control keys at the moment |
157 | high word of eax contains a status of control keys at the moment |
155 | of pressing a hotkey |
158 | of pressing a hotkey |
156 | Remarks: |
159 | Remarks: |
Line 813... | Line 816... | ||
813 | Remarks: |
816 | Remarks: |
814 | * Do not rely on returned value by incorrect call, it can be |
817 | * Do not rely on returned value by incorrect call, it can be |
815 | changed in future versions of the kernel. |
818 | changed in future versions of the kernel. |
Line 816... | Line 819... | ||
816 | 819 | ||
817 | ====================================================================== |
820 | ====================================================================== |
818 | ===== Function 18, subfunction 10 - minimize application window. ===== |
821 | ======= Function 18, subfunction 10 - minimize topmost window. ======= |
819 | ====================================================================== |
822 | ====================================================================== |
820 | Minimizes the own window. |
823 | Minimizes the topmost (active) window. |
821 | Parameters: |
824 | Parameters: |
822 | * eax = 18 - function number |
825 | * eax = 18 - function number |
823 | * ebx = 10 - subfunction number |
826 | * ebx = 10 - subfunction number |
824 | Returned value: |
827 | Returned value: |
825 | * function does not return value |
828 | * function does not return value |
826 | Remarks: |
829 | Remarks: |
827 | * The minimized window from the point of view of function 9 |
830 | * The minimized window from the point of view of function 9 |
828 | keeps position and sizes. |
831 | keeps position and sizes. |
829 | * Restoring of an application window occurs at its activation by |
832 | * Restoring of an application window occurs at its activation by |
830 | subfunction 3. |
833 | subfunction 3. |
831 | * Usually there is no necessity to minimize/restire a window |
834 | * Usually there is no necessity to minimize/restore a window |
832 | obviously: minimization of a window is carried out by the system |
835 | explicitly: minimization of a window is carried out by the system |
833 | at pressing the minimization button (for skinned windows |
836 | at pressing the minimization button (for skinned windows |
834 | it is defined automatically by function 0, |
837 | it is defined automatically by function 0, |
835 | for other windows it can be defined manually by function 8), |
838 | for other windows it can be defined manually by function 8), |
Line 840... | Line 843... | ||
840 | ====================================================================== |
843 | ====================================================================== |
841 | Parameters: |
844 | Parameters: |
842 | * eax = 18 - function number |
845 | * eax = 18 - function number |
843 | * ebx = 11 - subfunction number |
846 | * ebx = 11 - subfunction number |
844 | * ecx = type of the table: |
847 | * ecx = type of the table: |
845 | * 1 = short version, 10 bytes |
848 | * 1 = short version, 16 bytes |
846 | * 2 = full version, 65536 bytes |
- | |
847 | * edx = pointer to the buffer (in the application) for the table |
849 | * edx = pointer to the buffer (in the application) for the table |
848 | Returned value: |
850 | Returned value: |
849 | * function does not return value |
851 | * function does not return value |
850 | Format of the table: short version: |
852 | Format of the table: short version: |
851 | * +0: byte: information about FDD's (drives for floppies), |
853 | * +0: byte: information about FDD's (drives for floppies), |
Line 858... | Line 860... | ||
858 | * 4 = 1.44Mb, 3.5'' |
860 | * 4 = 1.44Mb, 3.5'' |
859 | * 5 = 2.88Mb, 3.5'' (such drives are not used anymore) |
861 | * 5 = 2.88Mb, 3.5'' (such drives are not used anymore) |
860 | For example, for the standard configuration from one 1.44-drive |
862 | For example, for the standard configuration from one 1.44-drive |
861 | here will be 40h, and for the case 1.2Mb on A: and 1.44Mb on B: |
863 | here will be 40h, and for the case 1.2Mb on A: and 1.44Mb on B: |
862 | the value is 24h. |
864 | the value is 24h. |
- | 865 | ||
- | 866 | First IDE controller: |
|
863 | * +1: byte: information about hard disks and CD-drives, AABBCCDD, |
867 | * +1: byte: information about hard disks and CD-drives, AABBCCDD, |
864 | where AA corresponds to the controller IDE0, ..., DD - IDE3: |
868 | where AA corresponds to the controller IDE0, ..., DD - IDE3: |
865 | * 0 = device is absent |
869 | * 0 = device not found |
866 | * 1 = hard drive |
870 | * 1 = hard drive |
867 | * 2 = CD-drive |
871 | * 2 = CD-drive |
868 | For example, in the case HD on IDE0 and CD on IDE2 |
872 | For example, in the case HD on IDE0 and CD on IDE2 |
869 | this field contains 48h. |
873 | this field contains 48h. |
870 | * +2: 4 db: number of the retrieved partitions on hard disks |
874 | * +2: 4 db: number of the retrieved partitions on hard disks |
871 | at accordingly IDE0,...,IDE3. |
875 | at accordingly IDE0,...,IDE3. |
- | 876 | ||
- | 877 | Second IDE controller: |
|
- | 878 | * +6: byte: information about hard disks and CD-drives, AABBCCDD, |
|
- | 879 | where AA corresponds to the controller IDE4, ..., DD - IDE7: |
|
- | 880 | * 0 = device not found |
|
- | 881 | * 1 = hard drive |
|
- | 882 | * 2 = CD-drive |
|
- | 883 | For example, in the case HD on IDE4 and CD on IDE6 |
|
- | 884 | this field contains 48h. |
|
- | 885 | * +7: 4 db: number of the retrieved partitions on hard disks |
|
- | 886 | at accordingly IDE4,...,IDE7. |
|
- | 887 | ||
- | 888 | Third IDE controller: |
|
- | 889 | * +11: byte: information about hard disks and CD-drives, AABBCCDD, |
|
- | 890 | where AA corresponds to the controller IDE8, ..., DD - IDE11: |
|
- | 891 | * 0 = device not found |
|
- | 892 | * 1 = hard drive |
|
- | 893 | * 2 = CD-drive |
|
- | 894 | For example, in the case HD on IDE8 and CD on IDE10 |
|
- | 895 | this field contains 48h. |
|
- | 896 | * +12: 4 db: number of the retrieved partitions on hard disks |
|
- | 897 | at accordingly IDE8,...,IDE11. |
|
- | 898 | ||
872 | If the hard disk on IDEx is absent, appropriate byte is zero, |
899 | If the hard disk on IDEx is absent, appropriate byte is zero, |
873 | otherwise it shows number of the recognized partitions, which |
900 | otherwise it shows number of the recognized partitions, which |
874 | can be not presented (if the drive is not formatted or if |
901 | can be not presented (if the drive is not formatted or if |
875 | the file system is not supported). Current version of the kernel |
902 | the file system is not supported). Current version of the kernel |
876 | supports only FAT16, FAT32 and NTFS for hard disks. |
903 | supports only FAT12/16/32, NTFS, ext2/3/4 and XFS for hard disks. |
877 | * +6: 4 db: reserved |
- | |
878 | Format of the table: full version: |
- | |
879 | * +0: 10 db: same as for the short version |
- | |
880 | * +10: 100 db: data for the first partition |
- | |
881 | * +110: 100 db: data for the second partition |
- | |
882 | * ... |
904 | |
883 | * +10+100*(n-1): 100 db: data for the last partition |
- | |
884 | The partitions are located as follows: at first sequentially all |
- | |
885 | recoginzed partitions on HD on IDE0 (if present), |
- | |
886 | then on HD on IDE1 (if present) and so on up to IDE3. |
- | |
887 | Format of the information about partition |
- | |
888 | (at moment only FAT is supported): |
- | |
889 | * +0: dword: first physical sector of the partition |
- | |
890 | * +4: dword: last physical sector of the partition |
- | |
891 | (belongs to the partition) |
- | |
892 | * +8: byte: file system type: |
- | |
893 | 16=FAT16, 32=FAT32, 1=NTFS |
- | |
894 | * other data are dependent on file system, are modified with |
- | |
895 | kernel modifications and therefore are not described |
- | |
896 | Remarks: |
905 | Remarks: |
897 | * The short table can be used for obtaining the information about |
906 | * The table can be used for obtaining the information about |
898 | available devices. |
907 | available devices. |
Line 899... | Line 908... | ||
899 | 908 | ||
900 | ====================================================================== |
909 | ====================================================================== |
901 | ========== Function 18, subfunction 13 - get kernel version. ========= |
910 | ========== Function 18, subfunction 13 - get kernel version. ========= |
Line 1207... | Line 1216... | ||
1207 | by the kernel itself; however the application '@panel' displays |
1216 | by the kernel itself; however the application '@panel' displays |
1208 | the corresponding icon. |
1217 | the corresponding icon. |
1209 | * The application @panel switches layouts on user request. |
1218 | * The application @panel switches layouts on user request. |
Line 1210... | Line 1219... | ||
1210 | 1219 | ||
1211 | ====================================================================== |
- | |
1212 | ============== Function 21, subfunction 3 - set CD base. ============= |
- | |
1213 | ====================================================================== |
- | |
1214 | Parameters: |
- | |
1215 | * eax = 21 - function number |
- | |
1216 | * ebx = 3 - subfunction number |
- | |
1217 | * ecx = CD base: 1=IDE0, 2=IDE1, 3=IDE2, 4=IDE3 |
- | |
1218 | Returned value: |
- | |
1219 | * eax = 0 |
- | |
1220 | Remarks: |
- | |
1221 | * CD base is used by function 24. |
- | |
1222 | * To get CD base use subfunction 3 of function 26. |
- | |
1223 | - | ||
1224 | ====================================================================== |
1220 | ====================================================================== |
1225 | ========== Function 21, subfunction 5 - set system language. ========= |
1221 | ========== Function 21, subfunction 5 - set system language. ========= |
1226 | ====================================================================== |
1222 | ====================================================================== |
1227 | Parameters: |
1223 | Parameters: |
1228 | * eax = 21 - function number |
1224 | * eax = 21 - function number |
Line 1237... | Line 1233... | ||
1237 | * Function does not check for correctness, as the kernel does not |
1233 | * Function does not check for correctness, as the kernel does not |
1238 | use this variable. |
1234 | use this variable. |
1239 | * To get system language use subfunction 5 of function 26. |
1235 | * To get system language use subfunction 5 of function 26. |
Line 1240... | Line 1236... | ||
1240 | 1236 | ||
1241 | ====================================================================== |
- | |
1242 | ============== Function 21, subfunction 7 - set HD base. ============= |
- | |
1243 | ====================================================================== |
- | |
1244 | The HD base defines hard disk to write with usage of obsolete |
- | |
1245 | syntax /HD in obsolete function 58; at usage of modern syntax |
- | |
1246 | /HD0,/HD1,/HD2,/HD3 base is set automatically. |
- | |
1247 | Parameters: |
- | |
1248 | * eax = 21 - function number |
- | |
1249 | * ebx = 7 - subfunction number |
- | |
1250 | * ecx = HD base: 1=IDE0, 2=IDE1, 3=IDE2, 4=IDE3 |
- | |
1251 | Returned value: |
- | |
1252 | * eax = 0 |
- | |
1253 | Remarks: |
- | |
1254 | * Any application at any time can change the base. |
- | |
1255 | * Do not change base, when any application works with hard disk. |
- | |
1256 | If you do not want system bugs. |
- | |
1257 | * To get HD base use subfunction 7 of function 26. |
- | |
1258 | * It is also necessary to define used partition of hard disk by |
- | |
1259 | subfunction 8. |
- | |
1260 | - | ||
1261 | ====================================================================== |
- | |
1262 | ========= Function 21, subfunction 8 - set used HD partition. ======== |
- | |
1263 | ====================================================================== |
- | |
1264 | The HD partition defines partition of the hard disk to write with |
- | |
1265 | usage of obsolete syntax /HD and obsolete function 58; |
- | |
1266 | at usage of functions 58 and 70 and modern syntax /HD0,/HD1,/HD2,/HD3 |
- | |
1267 | base and partition are set automatically. |
- | |
1268 | Parameters: |
- | |
1269 | * eax = 21 - function number |
- | |
1270 | * ebx = 8 - subfunction number |
- | |
1271 | * ecx = HD partition (beginning from 1) |
- | |
1272 | Return value: |
- | |
1273 | * eax = 0 |
- | |
1274 | Remarks: |
- | |
1275 | * Any application at any time can change partition. |
- | |
1276 | * Do not change partition when any application works with hard disk. |
- | |
1277 | If you do not want system bugs. |
- | |
1278 | * To get used partition use subfunction 8 of function 26. |
- | |
1279 | * There is no correctness checks. |
- | |
1280 | * To get the number of partitions of a hard disk use |
- | |
1281 | subfunction 11 of function 18. |
- | |
1282 | * It is also necessary to define used HD base by subfunction 7. |
- | |
1283 | - | ||
1284 | ====================================================================== |
1237 | ====================================================================== |
1285 | Function 21, subfunction 11 - enable/disable low-level access to HD. |
1238 | Function 21, subfunction 11 - enable/disable low-level access to HD. |
1286 | ====================================================================== |
1239 | ====================================================================== |
1287 | Parameters: |
1240 | Parameters: |
1288 | * eax = 21 - function number |
1241 | * eax = 21 - function number |
Line 1308... | Line 1261... | ||
1308 | * Is used in operations with PCI bus (function 62). |
1261 | * Is used in operations with PCI bus (function 62). |
1309 | * The current implementation uses only low bit of ecx. |
1262 | * The current implementation uses only low bit of ecx. |
1310 | * To get current status use subfunction 12 of function 26. |
1263 | * To get current status use subfunction 12 of function 26. |
Line 1311... | Line 1264... | ||
1311 | 1264 | ||
1312 | ====================================================================== |
- | |
1313 | ============ Function 21, subfunction 13, subsubfunction 1 =========== |
- | |
1314 | ======== Initialize + get information on the driver vmode.mdr. ======= |
- | |
1315 | ====================================================================== |
- | |
1316 | Parameters: |
- | |
1317 | * eax = 21 - function number |
- | |
1318 | * ebx = 13 - subfunction number |
- | |
1319 | * ecx = 1 - number of the driver function |
- | |
1320 | * edx = pointer to 512-bytes buffer |
- | |
1321 | Returned value: |
- | |
1322 | * if driver is not loaded |
- | |
1323 | (never happens in the current implementation): |
- | |
1324 | * eax = -1 |
- | |
1325 | * ebx, ecx destroyed |
- | |
1326 | * if driver is loaded: |
- | |
1327 | * eax = 'MDAZ' (in fasm style, that is 'M' - low byte, 'Z' - high) |
- | |
1328 | - signature |
- | |
1329 | * ebx = current frequency of the scanning (in Hz) |
- | |
1330 | * ecx destroyed |
- | |
1331 | * buffer pointed to by edx is filled |
- | |
1332 | Format of the buffer: |
- | |
1333 | * +0: 32*byte: driver name, "Trans VideoDriver" |
- | |
1334 | (without quotes, supplemented by spaces) |
- | |
1335 | * +32 = +0x20: dword: driver version (version x.y is encoded as |
- | |
1336 | y*65536+x), for the current implementation is 1 (1.0) |
- | |
1337 | * +36 = +0x24: 7*dword: reserved (0 in the current implementation) |
- | |
1338 | * +64 = +0x40: 32*word: list of supported videomodes (each word |
- | |
1339 | is number of a videomode, after list itself there are zeroes) |
- | |
1340 | * +128 = +0x80: 32*(5*word): list of supported frequences of the |
- | |
1341 | scannings for videomodes: for each videomode listed in the |
- | |
1342 | previous field up to 5 supported frequences are given |
- | |
1343 | (unused positions contain zeroes) |
- | |
1344 | Remarks: |
- | |
1345 | * Function initializes the driver (if it is not initialized yet) |
- | |
1346 | and must be called first, before others (otherwise they will do |
- | |
1347 | nothing and return -1). |
- | |
1348 | * The current implementation supports only one frequency |
- | |
1349 | of the scanning on videomode. |
- | |
1350 | - | ||
1351 | ====================================================================== |
- | |
1352 | ============ Function 21, subfunction 13, subsubfunction 2 =========== |
- | |
1353 | ================ Get information on current videomode. =============== |
- | |
1354 | ====================================================================== |
- | |
1355 | Parameters: |
- | |
1356 | * eax = 21 - function number |
- | |
1357 | * ebx = 13 - subfunction number |
- | |
1358 | * ecx = 2 - number of the driver function |
- | |
1359 | Returned value: |
- | |
1360 | * eax = -1 - driver is not loaded or not initialized; |
- | |
1361 | ebx,ecx are destroyed |
- | |
1362 | * eax = [width]*65536 + [height] |
- | |
1363 | * ebx = frequency of the vertical scanning (in Hz) |
- | |
1364 | * ecx = number of current videomode |
- | |
1365 | Remarks: |
- | |
1366 | * Driver must be initialized by call to |
- | |
1367 | driver function 1. |
- | |
1368 | * If only screen sizes are required, it is more expedient to use |
- | |
1369 | function 14 taking into account that it |
- | |
1370 | returns sizes on 1 less. |
- | |
1371 | - | ||
1372 | ====================================================================== |
- | |
1373 | === Function 21, subfunction 13, subsubfunction 3 - set videomode. === |
- | |
1374 | ====================================================================== |
- | |
1375 | Parameters: |
- | |
1376 | * eax = 21 - function number |
- | |
1377 | * ebx = 13 - subfunction number |
- | |
1378 | * ecx = 3 - number of the driver function |
- | |
1379 | * edx = [scanning frequency]*65536 + [videomode number] |
- | |
1380 | Returned value: |
- | |
1381 | * eax = -1 - driver is not loaded, not initialized or |
- | |
1382 | an error has occured |
- | |
1383 | * eax = 0 - success |
- | |
1384 | * ebx, ecx destroyed |
- | |
1385 | Remarks: |
- | |
1386 | * Driver must be initialized by driver function 1. |
- | |
1387 | * The videomode number and frequency must be in the table |
- | |
1388 | returned by driver function 1. |
- | |
1389 | - | ||
1390 | ====================================================================== |
- | |
1391 | ============ Function 21, subfunction 13, subsubfunction 4 =========== |
- | |
1392 | ================== Return to the initial videomode. ================== |
- | |
1393 | ====================================================================== |
- | |
1394 | Returns the screen to the videomode set at system boot. |
- | |
1395 | Parameters: |
- | |
1396 | * eax = 21 - function number |
- | |
1397 | * ebx = 13 - subfunction number |
- | |
1398 | * ecx = 4 - number of the driver function |
- | |
1399 | Returned value: |
- | |
1400 | * eax = -1 - driver is not loaded or not initialized |
- | |
1401 | * eax = 0 - success |
- | |
1402 | * ebx, ecx destroyed |
- | |
1403 | Remarks: |
- | |
1404 | * Driver must be initialized by call to driver function 1. |
- | |
1405 | - | ||
1406 | ====================================================================== |
- | |
1407 | ============ Function 21, subfunction 13, subsubfunction 5 =========== |
- | |
1408 | ===== Increase/decrease the size of the visible area of monitor. ===== |
- | |
1409 | ====================================================================== |
- | |
1410 | Parameters: |
- | |
1411 | * eax = 21 - function number |
- | |
1412 | * ebx = 13 - subfunction number |
- | |
1413 | * ecx = 5 - number of the driver function |
- | |
1414 | * edx = 0/1 - decrease/increase horizontal size on 1 position |
- | |
1415 | * edx = 2/3 - is not supported in the current implementation; |
- | |
1416 | is planned as decrease/increase vertical size on 1 position |
- | |
1417 | Returned value: |
- | |
1418 | * eax = -1 - driver is not loaded or not initialized |
- | |
1419 | * eax = 0 - success |
- | |
1420 | * ebx, ecx destroyed |
- | |
1421 | Remarks: |
- | |
1422 | * Driver must be initialized by call to driver function 1. |
- | |
1423 | * Function influences only the physical size of the screen image; |
- | |
1424 | the logical size (number of pixels) does not change. |
- | |
1425 | - | ||
1426 | ====================================================================== |
1265 | ====================================================================== |
1427 | ================= Function 22 - set system date/time. ================ |
1266 | ================= Function 22 - set system date/time. ================ |
1428 | ====================================================================== |
1267 | ====================================================================== |
1429 | Parameters: |
1268 | Parameters: |
1430 | * eax = 22 - function number |
1269 | * eax = 22 - function number |
Line 1483... | Line 1322... | ||
1483 | * Current implementation returns immediately with eax=0, |
1322 | * Current implementation returns immediately with eax=0, |
1484 | if the addition of ebx with the current value of time counter |
1323 | if the addition of ebx with the current value of time counter |
1485 | makes 32-bit overflow. |
1324 | makes 32-bit overflow. |
Line 1486... | Line 1325... | ||
1486 | 1325 | ||
1487 | ====================================================================== |
- | |
1488 | ======== Function 24, subfunction 1 - begin to play CD-audio. ======== |
- | |
1489 | ====================================================================== |
- | |
1490 | Parameters: |
- | |
1491 | * eax = 24 - function number |
- | |
1492 | * ebx = 1 - subfunction number |
- | |
1493 | * ecx = 0x00FRSSMM, where |
- | |
1494 | * MM = starting minute |
- | |
1495 | * SS = starting second |
- | |
1496 | * FR = starting frame |
- | |
1497 | Returned value: |
- | |
1498 | * eax = 0 - success |
- | |
1499 | * eax = 1 - CD base is not defined |
- | |
1500 | Remarks: |
- | |
1501 | * Previously CD base must be defined by the call to |
- | |
1502 | subfunction 3 of function 21. |
- | |
1503 | * One second includes 75 frames, one minute includes 60 seconds. |
- | |
1504 | * The function is asynchronous (returns control, when play begins). |
- | |
1505 | - | ||
1506 | ====================================================================== |
- | |
1507 | ======= Function 24, subfunction 2 - get information on tracks. ====== |
- | |
1508 | ====================================================================== |
- | |
1509 | Parameters: |
- | |
1510 | * eax = 24 - function number |
- | |
1511 | * ebx = 2 - subfunction number |
- | |
1512 | * ecx = pointer to the buffer for the table |
- | |
1513 | (maximum 8*64h+4 bytes=100 tracks) |
- | |
1514 | Returned value: |
- | |
1515 | * eax = 0 - success |
- | |
1516 | * eax = 1 - CD base is not defined |
- | |
1517 | Remarks: |
- | |
1518 | * The format of the table with tracks information is the same as |
- | |
1519 | for ATAPI-CD command 43h (READ TOC), usual table (subcommand 00h). |
- | |
1520 | Function returns addresses in MSF. |
- | |
1521 | * Previously CD base port must be set by call to |
- | |
1522 | subfunction 3 of function 21. |
- | |
1523 | * Function returns information only about no more than 100 |
- | |
1524 | first tracks. In most cases it is enough. |
- | |
1525 | - | ||
1526 | ====================================================================== |
- | |
1527 | ========== Function 24, subfunction 3 - stop play CD-audio. ========== |
- | |
1528 | ====================================================================== |
- | |
1529 | Parameters: |
- | |
1530 | * eax = 24 - function number |
- | |
1531 | * ebx = 1 - subfunction number |
- | |
1532 | Returned value: |
- | |
1533 | * eax = 0 - success |
- | |
1534 | * eax = 1 - CD base is not defined |
- | |
1535 | Remarks: |
- | |
1536 | * Previously CD base port must be defined by call to |
- | |
1537 | subfunction 3 of function 21. |
- | |
1538 | - | ||
1539 | ====================================================================== |
1326 | ====================================================================== |
1540 | ======= Function 24, subfunction 4 - eject tray of disk drive. ======= |
1327 | ======= Function 24, subfunction 4 - eject tray of disk drive. ======= |
1541 | ====================================================================== |
1328 | ====================================================================== |
1542 | Parameters: |
1329 | Parameters: |
1543 | * eax = 24 - function number |
1330 | * eax = 24 - function number |
1544 | * ebx = 4 - subfunction number |
1331 | * ebx = 4 - subfunction number |
1545 | * ecx = position of CD/DVD-drive |
1332 | * ecx = position of CD/DVD-drive |
- | 1333 | from 0=Primary Master to 3=Secondary Slave for first IDE contr. |
|
- | 1334 | from 4=Primary Master to 7=Secondary Slave for second IDE contr. |
|
1546 | (from 0=Primary Master to 3=Secondary Slave) |
1335 | from 8=Primary Master to 11=Secondary Slave for third IDE contr. |
1547 | Returned value: |
1336 | Returned value: |
1548 | * function does not return value |
1337 | * function does not return value |
1549 | Remarks: |
1338 | Remarks: |
1550 | * The function is supported only for ATAPI devices (CD and DVD). |
1339 | * The function is supported only for ATAPI devices (CD and DVD). |
Line 1559... | Line 1348... | ||
1559 | ====================================================================== |
1348 | ====================================================================== |
1560 | Parameters: |
1349 | Parameters: |
1561 | * eax = 24 - function number |
1350 | * eax = 24 - function number |
1562 | * ebx = 5 - subfunction number |
1351 | * ebx = 5 - subfunction number |
1563 | * ecx = position of CD/DVD-drive |
1352 | * ecx = position of CD/DVD-drive |
1564 | (from 0=Primary Master to 3=Secondary Slave) |
1353 | from 0=Primary Master to 3=Secondary Slave for first IDE contr. |
- | 1354 | from 4=Primary Master to 7=Secondary Slave for second IDE contr. |
|
- | 1355 | from 8=Primary Master to 11=Secondary Slave for third IDE contr. |
|
1565 | Returned value: |
1356 | Returned value: |
1566 | * function does not return value |
1357 | * function does not return value |
1567 | Remarks: |
1358 | Remarks: |
1568 | * The function is supported only for ATAPI devices (CD and DVD). |
1359 | * The function is supported only for ATAPI devices (CD and DVD). |
1569 | * An example of usage of the function is the application CD_tray. |
1360 | * An example of usage of the function is the application CD_tray. |
Line 1634... | Line 1425... | ||
1634 | by the kernel itself; however the application '@panel' displays |
1425 | by the kernel itself; however the application '@panel' displays |
1635 | the corresponding icon (using this function). |
1426 | the corresponding icon (using this function). |
1636 | * The application @panel switches layouts on user request. |
1427 | * The application @panel switches layouts on user request. |
Line 1637... | Line 1428... | ||
1637 | 1428 | ||
1638 | ====================================================================== |
- | |
1639 | ============== Function 26, subfunction 3 - get CD base. ============= |
- | |
1640 | ====================================================================== |
- | |
1641 | Parameters: |
- | |
1642 | * eax = 26 - function number |
- | |
1643 | * ebx = 3 - subfunction number |
- | |
1644 | Returned value: |
- | |
1645 | * eax = CD base: 1=IDE0, 2=IDE1, 3=IDE2, 4=IDE3 |
- | |
1646 | Remarks: |
- | |
1647 | * CD base is used by function 24. |
- | |
1648 | * To set CD base use subfunction 3 of function 21. |
- | |
1649 | - | ||
1650 | ====================================================================== |
1429 | ====================================================================== |
1651 | ========== Function 26, subfunction 5 - get system language. ========= |
1430 | ========== Function 26, subfunction 5 - get system language. ========= |
1652 | ====================================================================== |
1431 | ====================================================================== |
1653 | Parameters: |
1432 | Parameters: |
1654 | * eax = 26 - function number |
1433 | * eax = 26 - function number |
Line 1660... | Line 1439... | ||
1660 | by the kernel itself, however application @panel draws the |
1439 | by the kernel itself, however application @panel draws the |
1661 | appropriate icon (using this function). |
1440 | appropriate icon (using this function). |
1662 | * To set system language use subfunction 5 of function 21. |
1441 | * To set system language use subfunction 5 of function 21. |
Line 1663... | Line 1442... | ||
1663 | 1442 | ||
1664 | ====================================================================== |
- | |
1665 | ============== Function 26, subfunction 7 - get HD base. ============= |
- | |
1666 | ====================================================================== |
- | |
1667 | The HD base defines hard disk to write with usage of obsolete |
- | |
1668 | syntax /HD in obsolete function 58; at usage of modern syntax |
- | |
1669 | /HD0,/HD1,/HD2,/HD3 base is set automatically. |
- | |
1670 | Parameters: |
- | |
1671 | * eax = 26 - function number |
- | |
1672 | * ebx = 7 - subfunction number |
- | |
1673 | Returned value: |
- | |
1674 | * eax = HD base: 1=IDE0, 2=IDE1, 3=IDE2, 4=IDE3 |
- | |
1675 | Remarks: |
- | |
1676 | * Any application in any time can change HD base. |
- | |
1677 | * To set base use subfunction 7 of function 21. |
- | |
1678 | * To get used partition of hard disk use subfunction 8. |
- | |
1679 | - | ||
1680 | ====================================================================== |
- | |
1681 | ========= Function 26, subfunction 8 - get used HD partition. ======== |
- | |
1682 | ====================================================================== |
- | |
1683 | The HD partition defines partition of the hard disk to write with |
- | |
1684 | usage of obsolete syntax /HD in obsolete function 58; |
- | |
1685 | at usage of functions 58 and 70 and modern syntax /HD0,/HD1,/HD2,/HD3 |
- | |
1686 | base and partition are set automatically. |
- | |
1687 | Parameters: |
- | |
1688 | * eax = 26 - function number |
- | |
1689 | * ebx = 8 - subfunction number |
- | |
1690 | Returned value: |
- | |
1691 | * eax = HD partition (beginning from 1) |
- | |
1692 | Remarks: |
- | |
1693 | * Any application in any time can change partition. |
- | |
1694 | * To set partition use subfunction 8 of function 21. |
- | |
1695 | * To get number of partitions on a hard disk use |
- | |
1696 | subfunction 11 of function 18. |
- | |
1697 | * To get base of used hard disk, use subfunction 7. |
- | |
1698 | - | ||
1699 | ====================================================================== |
1443 | ====================================================================== |
1700 | === Function 26, subfunction 9 - get the value of the time counter. == |
1444 | === Function 26, subfunction 9 - get the value of the time counter. == |
1701 | ====================================================================== |
1445 | ====================================================================== |
1702 | Parameters: |
1446 | Parameters: |
1703 | * eax = 26 - function number |
1447 | * eax = 26 - function number |
Line 2313... | Line 2057... | ||
2313 | ============= Function 48, subfunction 8 - set used skin. ============ |
2057 | ============= Function 48, subfunction 8 - set used skin. ============ |
2314 | ====================================================================== |
2058 | ====================================================================== |
2315 | Parameters: |
2059 | Parameters: |
2316 | * eax = 48 - function number |
2060 | * eax = 48 - function number |
2317 | * ebx = 8 - subfunction number |
2061 | * ebx = 8 - subfunction number |
2318 | * ecx = pointer to a block for function 58, in |
2062 | * ecx = pointer to filename of the skin |
2319 | which the fields of intermediate buffer and file name are filled |
- | |
2320 | Returned value: |
2063 | Returned value: |
2321 | * eax = 0 - success |
2064 | * eax = 0 - success |
2322 | * otherwise eax = file system error code; if file does not |
2065 | * otherwise eax = file system error code; if file does not |
2323 | contain valid skin, function returns error 3 |
2066 | contain valid skin, function returns error 3 |
2324 | (unknown file system). |
2067 | (unknown file system). |
Line 2525... | Line 2268... | ||
2525 | http://alpha1.dyns.net/files/PCI/bios21.pdf. |
2268 | http://alpha1.dyns.net/files/PCI/bios21.pdf. |
2526 | * If BIOS does not support this extension, its behavior is emulated |
2269 | * If BIOS does not support this extension, its behavior is emulated |
2527 | (through kernel-mode analogues of subfunctions of function 62). |
2270 | (through kernel-mode analogues of subfunctions of function 62). |
Line 2528... | Line 2271... | ||
2528 | 2271 | ||
2529 | ====================================================================== |
- | |
2530 | ================ Function 58 - work with file system. ================ |
- | |
2531 | ====================================================================== |
- | |
2532 | Parameters: |
- | |
2533 | * eax = 58 |
- | |
2534 | * ebx = pointer to the information structure |
- | |
2535 | Returned value: |
- | |
2536 | * eax = 0 - success; otherwise file system error code |
- | |
2537 | * some subfunctions return value in other registers too |
- | |
2538 | General format of the information structure: |
- | |
2539 | * +0: dword: subfunction number |
- | |
2540 | * +4: dword: number of block |
- | |
2541 | * +8: dword: size |
- | |
2542 | * +12 = +0xC: dword: pointer to data |
- | |
2543 | * +16 = +0x10: dword: pointer to a memory for system operations |
- | |
2544 | (4096 bytes) |
- | |
2545 | * +20 = +0x14: n db: ASCIIZ-string with the file name |
- | |
2546 | Specifications - in documentation on the appropriate subfunction. |
- | |
2547 | Filename is case-insensitive for latin letters, russian letters |
- | |
2548 | must be capital. |
- | |
2549 | Format of filename: |
- | |
2550 | /base/number/dir1/dir2/.../dirn/file, |
- | |
2551 | where /base/number identifies device, on which file is located: |
- | |
2552 | one of |
- | |
2553 | * /RD/1 = /RAMDISK/1 to access ramdisk |
- | |
2554 | * /FD/1 = /FLOPPYDISK/1 to access first floppy drive, |
- | |
2555 | /FD/2 = /FLOPPYDISK/2 to access second one |
- | |
2556 | * /HD/x = /HARDDISK/x - obsolete variant of access to hard disk |
- | |
2557 | (in this case base is defined by subfunction 7 of function 21), |
- | |
2558 | x - partition number (beginning from 1) |
- | |
2559 | * /HD0/x, /HD1/x, /HD2/x, /HD3/x to access accordingly to devices |
- | |
2560 | IDE0 (Primary Master), IDE1 (Primary Slave), |
- | |
2561 | IDE2 (Secondary Master), IDE3 (Secondary Slave); |
- | |
2562 | x - partition number on the selected hard drive, varies from 1 |
- | |
2563 | to 255 (on each hard drive the indexing starts from 1) |
- | |
2564 | Remarks: |
- | |
2565 | * In the first two cases it is also possible to use FIRST |
- | |
2566 | instead of 1, SECOND instead of 2, but it is not recommended |
- | |
2567 | for convenience of transition to the future extensions. |
- | |
2568 | * Limitation n<=39 is imposed. |
- | |
2569 | * Names of folders and file dir1,...,dirn,file must have the |
- | |
2570 | format 8.3: name no more than 8 characters, dot, extension no |
- | |
2571 | more than 3 characters. Trailing spaces are ignored, no other |
- | |
2572 | spaces is allowed. If name occupies equally 8 characters, |
- | |
2573 | dot may be omitted (though it is not recommended to use this |
- | |
2574 | feature for convenience of transition to the future extensions). |
- | |
2575 | * This function does not support folders on ramdisk. |
- | |
2576 | Examples: |
- | |
2577 | * '/RAMDISK/FIRST/KERNEL.ASM',0 |
- | |
2578 | '/rd/1/kernel.asm',0 |
- | |
2579 | * '/HD0/1/kernel.asm',0 |
- | |
2580 | * '/hd0/1/menuet/pics/tanzania.bmp',0 |
- | |
2581 | Existing subfunctions: |
- | |
2582 | * subfunction 0 - read file/folder |
- | |
2583 | * subfunction 8 - LBA-read from device |
- | |
2584 | * subfunction 15 - get file system information |
- | |
2585 | - | ||
2586 | ====================================================================== |
- | |
2587 | =========== Function 58, subfunction 0 - read file/folder. =========== |
- | |
2588 | ====================================================================== |
- | |
2589 | Parameters: |
- | |
2590 | * eax = 58 |
- | |
2591 | * ebx = pointer to the information structure |
- | |
2592 | Format of the information structure: |
- | |
2593 | * +0: dword: 0 = subfunction number |
- | |
2594 | * +4: dword: first block to read (beginning from 0) |
- | |
2595 | * +8: dword: amount of blocks to read |
- | |
2596 | * +12 = +0xC: dword: pointer to buffer for data |
- | |
2597 | * +16 = +0x10: dword: pointer to buffer for system operations |
- | |
2598 | (4096 bytes) |
- | |
2599 | * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are |
- | |
2600 | given in the general description |
- | |
2601 | Returned value: |
- | |
2602 | * eax = 0 - success, otherwise file system error code |
- | |
2603 | * ebx = file size (in bytes) or -1=0xffffffff, if file was not found |
- | |
2604 | Remarks: |
- | |
2605 | * Block size is 512 bytes. |
- | |
2606 | * This function is obsolete, for reading files use subfunction 0 |
- | |
2607 | of function 70, for reading folders - subfunction 1 of |
- | |
2608 | function 70. |
- | |
2609 | * Function can read contents of a folder. Only FAT file system is |
- | |
2610 | supported. The format of FAT-folder is described |
- | |
2611 | in any FAT documentation. |
- | |
2612 | * Size of a folder is determined by size of FAT clusters chain. |
- | |
2613 | * If file was ended before last requested block was read, |
- | |
2614 | the function will read as many as it can, and after that return |
- | |
2615 | eax=6 (EOF). |
- | |
2616 | * Function can read root folders /rd/1,/fd/x,/hd[n]/x, but |
- | |
2617 | in the first two cases the current implementation does not follow |
- | |
2618 | to the declared rules: |
- | |
2619 | for /rd/1: |
- | |
2620 | * if one want to read 0 blocks, function considers, |
- | |
2621 | that he requested 1; |
- | |
2622 | * if one requests more than 14 blocks or starting block is |
- | |
2623 | not less than 14, function returns eax=5 (not found) and ebx=-1; |
- | |
2624 | * size of ramdisk root folder is 14 blocks, |
- | |
2625 | 0x1C00=7168 bytes; but function returns ebx=0 |
- | |
2626 | (except of the case of previous item); |
- | |
2627 | * strangely enough, it is possible to read 14th block (which |
- | |
2628 | generally contains a garbage - I remind, the indexing begins |
- | |
2629 | from 0); |
- | |
2630 | * if some block with the number not less than 14 was requested, |
- | |
2631 | function returns eax=6(EOF); otherwise eax=0. |
- | |
2632 | For /fd/x: |
- | |
2633 | * if the start block is not less than 14, function returns |
- | |
2634 | eax=5 (not found) and ebx=0; |
- | |
2635 | * note that format of FAT12 allows floppies with the root size |
- | |
2636 | more or less than 14 blocks; |
- | |
2637 | * check for length is not performed; |
- | |
2638 | * if data was successful read, function returns |
- | |
2639 | eax=0,ebx=0; otherwise eax=10 (access denied), ebx=-1. |
- | |
2640 | * The function handles reading of special folders /,/rd,/fd,/hd[n]; |
- | |
2641 | but the result does not correspond to expected (on operations with |
- | |
2642 | normal files/folders), does not follow the declared rules, |
- | |
2643 | may be changed in future versions of the kernel and consequently |
- | |
2644 | is not described. To obtain the information about the equipment |
- | |
2645 | use subfunction 11 of function 18 or |
- | |
2646 | read corresponding folder with subfunction 1 of function 70. |
- | |
2647 | - | ||
2648 | ====================================================================== |
- | |
2649 | ========= Function 58, subfunction 8 - LBA-read from device. ========= |
- | |
2650 | ====================================================================== |
- | |
2651 | Parameters: |
- | |
2652 | * eax = 58 - function number |
- | |
2653 | * ebx = pointer to the information structure |
- | |
2654 | Format of the information structure: |
- | |
2655 | * +0: dword: 8 = subfunction number |
- | |
2656 | * +4: dword: number of block to read (beginning from 0) |
- | |
2657 | * +8: dword: ignored (set to 1) |
- | |
2658 | * +12 = +0xC: dword: pointer to buffer for data (512 bytes) |
- | |
2659 | * +16 = +0x10: dword: pointer to buffer for system operations |
- | |
2660 | (4096 bytes) |
- | |
2661 | * +20 = +0x14: ASCIIZ-name of device: case-insensitive, one of |
- | |
2662 | /rd/1 = /RamDisk/1, /hd/n = /HardDisk/n, |
- | |
2663 | 1<=n<=4 - number of device: 1=IDE0, ..., 4=IDE3. |
- | |
2664 | Instead of digits it is allowed, though not recommended for |
- | |
2665 | convenience of transition to future extensions, to use |
- | |
2666 | 'first','second','third','fourth'. |
- | |
2667 | Returned value: |
- | |
2668 | * for device name /hd/xxx, where xxx is not in the list above: |
- | |
2669 | * eax = ebx = 1 |
- | |
2670 | * for invalid device name (except for the previous case): |
- | |
2671 | * eax = 5 |
- | |
2672 | * ebx does not change |
- | |
2673 | * if LBA-access is disabled by subfunction 11 of function 21: |
- | |
2674 | * eax = 2 |
- | |
2675 | * ebx destroyed |
- | |
2676 | * for ramdisk: attempt to read block outside ramdisk |
- | |
2677 | (18*2*80 blocks) results in |
- | |
2678 | * eax = 3 |
- | |
2679 | * ebx = 0 |
- | |
2680 | * for successful read: |
- | |
2681 | * eax = ebx = 0 |
- | |
2682 | Remarks: |
- | |
2683 | * Block size is 512 bytes; function reads one block. |
- | |
2684 | * Do not depend on returned value, it can be changed |
- | |
2685 | in future versions. |
- | |
2686 | * Function requires that LBA-access to devices is enabled by |
- | |
2687 | subfunction 11 of function 21. To check this one can use |
- | |
2688 | subfunction 11 of function 26. |
- | |
2689 | * LBA-read of floppy is not supported. |
- | |
2690 | * Function reads data on physical hard drive; if for any reason |
- | |
2691 | data of the concrete partition are required, application must |
- | |
2692 | define starting sector of this partition (either directly |
- | |
2693 | through MBR, or from the full structure returned by |
- | |
2694 | subfunction 11 of function 18). |
- | |
2695 | * Function does not check error code of hard disk, so request of |
- | |
2696 | nonexisting sector reads something (most probably it will be |
- | |
2697 | zeroes, but this is defined by device) and this is considered |
- | |
2698 | as success (eax=0). |
- | |
2699 | - | ||
2700 | ====================================================================== |
- | |
2701 | ==== Function 58, subfunction 15 - get information on file system. === |
- | |
2702 | ====================================================================== |
- | |
2703 | Parameters: |
- | |
2704 | * eax = 58 - function number |
- | |
2705 | * ebx = pointer to the information structure |
- | |
2706 | Format of the information structure: |
- | |
2707 | * +0: dword: 15 = subfunction number |
- | |
2708 | * +4: dword: ignored |
- | |
2709 | * +8: dword: ignored |
- | |
2710 | * +12 = +0xC: dword: ignored |
- | |
2711 | * +16 = +0x10: dword: ignored |
- | |
2712 | * +20 = +0x14: (only second character is checked) |
- | |
2713 | /rd=/RAMDISK or /hd=/HARDDISK |
- | |
2714 | Returned value: |
- | |
2715 | * if the second character does not belong to set {'r','R','h','H'}: |
- | |
2716 | * eax = 3 |
- | |
2717 | * ebx = ecx = dword [fileinfo] = 0 |
- | |
2718 | * for ramdisk: |
- | |
2719 | * eax = 0 (success) |
- | |
2720 | * ebx = total number of clusters = 2847 |
- | |
2721 | * ecx = number of free clusters |
- | |
2722 | * dword [fileinfo] = cluster size = 512 |
- | |
2723 | * for hard disk: base and partition are defined by subfunctions |
- | |
2724 | 7 and 8 of function 21: |
- | |
2725 | * eax = 0 (success) |
- | |
2726 | * ebx = total number of clusters |
- | |
2727 | * ecx = number of free clusters |
- | |
2728 | * dword [fileinfo] = cluster size (in bytes) |
- | |
2729 | Remarks: |
- | |
2730 | * Be not surprised to strange layout of 4th returned parameter |
- | |
2731 | - when this code was writing, at system calls application got |
- | |
2732 | only registers eax,ebx,ecx (from pushad-structure transmitted |
- | |
2733 | as argument to the system function). Now it is corrected, so, |
- | |
2734 | probably, it is meaningful to return cluster size in edx, while |
- | |
2735 | this function is not used yet. |
- | |
2736 | * There exists also subfunction 11 of function 18, |
- | |
2737 | which returns information on file system. From the full table |
- | |
2738 | of disk subsystem it is possible to deduce cluster size (there |
- | |
2739 | it is stored in sectors) and total number of clusters |
- | |
2740 | for hard disks. |
- | |
2741 | - | ||
2742 | ====================================================================== |
2272 | ====================================================================== |
2743 | ========== Function 60 - Inter Process Communication (IPC). ========== |
2273 | ========== Function 60 - Inter Process Communication (IPC). ========== |
2744 | ====================================================================== |
2274 | ====================================================================== |
2745 | IPC is used for message dispatching from one process/thread to |
2275 | IPC is used for message dispatching from one process/thread to |
2746 | another. Previously it is necessary to agree how to interpret |
2276 | another. Previously it is necessary to agree how to interpret |
Line 4500... | Line 4030... | ||
4500 | * eax = 75 - function number |
4030 | * eax = 75 - function number |
4501 | * bl = 10 - subfunction number |
4031 | * bl = 10 - subfunction number |
4502 | Returned value: |
4032 | Returned value: |
4503 | * eax = socketnum1, -1 on error |
4033 | * eax = socketnum1, -1 on error |
4504 | * ebx = socketnum2, errorcode on error |
4034 | * ebx = socketnum2, errorcode on error |
4505 | Remarks: |
- | |
4506 | - | ||
4507 | Optstruct: dd level |
- | |
4508 | dd optionname |
- | |
4509 | dd optlength |
- | |
4510 | db options... |
- | |
Line 4511... | Line 4035... | ||
4511 | 4035 | ||
4512 | ====================================================================== |
4036 | ====================================================================== |
4513 | =============== Function -1 - terminate thread/process =============== |
4037 | =============== Function -1 - terminate thread/process =============== |
4514 | ====================================================================== |
4038 | ====================================================================== |