Rev 381 | Rev 424 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 381 | Rev 412 | ||
---|---|---|---|
Line 1029... | Line 1029... | ||
1029 | 1029 | ||
Line 1030... | Line 1030... | ||
1030 | ; VRR_M USE |
1030 | ; VRR_M USE |
1031 | 1031 | ||
1032 | mov al,[preboot_vrrm-0x10000] |
- | |
1033 | mov [es:0x9030],al |
- | |
1034 | - | ||
1035 | - | ||
1036 | ; MEMORY MODEL |
- | |
1037 | - | ||
1038 | ; movzx eax,byte [es:preboot_memory-0x10000] |
- | |
1039 | ; cmp eax,0 |
- | |
1040 | ; jne pre_mem |
- | |
1041 | ;;;;;;;;;;;;;;;;;;;;;;;;; |
- | |
1042 | ; mario79 - memory size ; |
- | |
1043 | ;;;;;;;;;;;;;;;;;;;;;;;;; |
- | |
1044 | ; mov ax,0E801h |
- | |
1045 | ;;; xor bx,bx ; thanks to Alexei for bugfix [18.07.2004] |
- | |
1046 | ; xor cx, cx |
- | |
1047 | ; xor dx, dx |
- | |
1048 | ; int 0x15 |
- | |
1049 | ; movzx ebx, dx ;bx |
- | |
1050 | ; movzx eax, cx ;ax |
- | |
1051 | ; shl ebx,6 ; ïåðåâîä â êèëîáàéòû (x64) |
- | |
1052 | ; add eax,ebx |
- | |
1053 | ; add eax, 1000h ;440h |
- | |
1054 | ; cmp eax,40000h ; 256? |
- | |
1055 | ; jge mem_256_z |
- | |
1056 | ; cmp eax,20000h ; 128? |
- | |
1057 | ; jge mem_128_z |
- | |
1058 | ; cmp eax,10000h ; 64? |
- | |
1059 | ; jge mem_64_z |
- | |
1060 | ; cmp eax,8000h ; 32? |
- | |
1061 | ; jge mem_32_z |
- | |
1062 | ; jmp mem_16_z |
- | |
1063 | ; |
- | |
1064 | ;mem_256_z: mov si,memokz256-0x10000 |
- | |
1065 | ; call printplain |
- | |
1066 | ; mov eax,5 |
- | |
1067 | ; jmp pre_mem |
- | |
1068 | ;mem_128_z: mov si,memokz128-0x10000 |
- | |
1069 | ; call printplain |
- | |
1070 | ; mov eax,4 |
- | |
1071 | ; jmp pre_mem |
- | |
1072 | ;mem_64_z: mov si,memokz64-0x10000 |
- | |
1073 | ; call printplain |
- | |
1074 | ; mov eax,3 |
- | |
1075 | ; jmp pre_mem |
- | |
1076 | ;mem_32_z: mov si,memokz32-0x10000 |
- | |
1077 | ; call printplain |
- | |
1078 | ; mov eax,2 |
- | |
1079 | ; jmp pre_mem |
- | |
1080 | ;mem_16_z: mov si,memokz16-0x10000 |
- | |
1081 | ; call printplain |
- | |
1082 | ; mov eax,1 |
- | |
1083 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
- | |
1084 | ; pre_mem: |
- | |
1085 | ; push word 0x0000 |
- | |
1086 | ; pop es |
- | |
1087 | ; mov [es:0x9030],al |
- | |
1088 | ; push word 0x1000 |
- | |
1089 | ; pop es |
- | |
1090 | ; mov si,linef-0x10000 |
- | |
1091 | ; call printplain |
- | |
1092 | - | ||
1093 | - | ||
1094 | - | ||
1095 | - | ||
1096 | ; DIRECT WRITE TO LFB, PAGING DISABLED |
- | |
1097 | - | ||
1098 | ; movzx eax,byte [es:preboot_lfb-0x10000] |
- | |
1099 | ; mov eax,1 ; paging disabled |
- | |
1100 | ; cmp eax,0 |
- | |
1101 | ; jne pre_lfb |
- | |
1102 | ; mov si,gr_direct-0x10000 |
- | |
1103 | ; call printplain |
- | |
1104 | ; mov ebx,'12' |
- | |
1105 | ; call getkey |
- | |
1106 | ; pre_lfb: |
- | |
1107 | ; push word 0x0000 |
- | |
1108 | ; pop es |
- | |
1109 | ; mov [es:0x901E],al |
- | |
1110 | ; mov ax,0x1000 |
- | |
1111 | ; mov es,ax |
- | |
1112 | ; mov si,linef-0x10000 |
1032 | mov al,[preboot_vrrm-0x10000] |
Line 1113... | Line -... | ||
1113 | ; call printplain |
- | |
1114 | mov [es:0x901E],byte 1 |
- | |
1115 | 1033 | mov [es:0x9030],al |
|
Line 1116... | Line 1034... | ||
1116 | 1034 | mov [es:0x901E],byte 1 |
|
1117 | 1035 | ||
1118 | ; BOOT DEVICE |
1036 | ; BOOT DEVICE |
Line 1329... | Line 1247... | ||
1329 | int 0x13 |
1247 | int 0x13 |
1330 | mov dx,0x3f2 ; floppy motor off |
1248 | mov dx,0x3f2 ; floppy motor off |
1331 | mov al,0 |
1249 | mov al,0 |
1332 | out dx,al |
1250 | out dx,al |
Line 1333... | Line -... | ||
1333 | - | ||
1334 | push es |
- | |
1335 | ; PAGE TABLE |
- | |
1336 | - | ||
1337 | push dword [es:0x9018] |
- | |
1338 | ; |
- | |
1339 | ; mmap_mem equ 64 ; amount of memory to map |
- | |
1340 | ; |
- | |
1341 | push 0x6000 |
- | |
1342 | pop es ; es:di = 6000:0 |
- | |
1343 | ; xor di,di |
- | |
1344 | ; mov cx,256*mmap_mem ; Map (mapmem) M |
- | |
1345 | ;; initialize as identity mapping |
- | |
1346 | ; xor eax, eax |
- | |
1347 | ; call pagetable_set |
- | |
1348 | ; |
- | |
1349 | ; |
- | |
1350 | ; 4 KB PAGE DIRECTORY |
- | |
1351 | ; |
- | |
1352 | push 0x7F00 |
- | |
1353 | pop es ; es:di = 7F00:0 |
- | |
1354 | ; xor di, di |
- | |
1355 | ; mov cx, 64 / 4 |
- | |
1356 | ; mov eax, 0x60007 ; for 0 M |
- | |
1357 | ; call pagetable_set |
- | |
1358 | ; xor si,si |
- | |
1359 | ; mov di,second_base_address shr 20 |
- | |
1360 | ; mov cx,64/2 |
- | |
1361 | ; rep movs word [es:di], [es:si] |
- | |
1362 | - | ||
1363 | ; mov eax, 0x7F000 +8+16 ; Page directory and enable caches |
- | |
Line 1364... | Line 1251... | ||
1364 | ; mov cr3, eax |
1251 | |
Line 1365... | Line -... | ||
1365 | - | ||
1366 | ; SET GRAPHICS |
- | |
1367 | 1252 | ||
1368 | pop es |
1253 | ; SET GRAPHICS |
Line 1369... | Line 1254... | ||
1369 | 1254 | ||
1370 | xor ax, ax |
1255 | xor ax, ax |
Line 1403... | Line 1288... | ||
1403 | 1288 | ||
1404 | mov al,0x08 |
1289 | mov al,0x08 |
1405 | pop dx |
1290 | pop dx |
1406 | out dx,al ; select GDC bit mask register |
1291 | out dx,al ; select GDC bit mask register |
1407 | ; for writes to 0x03cf |
- | |
1408 | 1292 | ; for writes to 0x03cf |
|
1409 | gmok2: |
1293 | gmok2: |
1410 | push ds |
1294 | push ds |