wok-current diff linld/stuff/src/A20.ASM @ rev 22187
updated xorg-dev-proto (7.5 -> 7.7)
author | Hans-G?nter Theisgen |
---|---|
date | Mon Nov 11 09:07:45 2019 +0100 (2019-11-11) |
parents | 08212b207b25 |
children | f3a4853e3eef |
line diff
1.1 --- a/linld/stuff/src/A20.ASM Sun Nov 10 11:45:54 2019 +0100 1.2 +++ b/linld/stuff/src/A20.ASM Mon Nov 11 09:07:45 2019 +0100 1.3 @@ -18,6 +18,9 @@ 1.4 dw _enable_a20_fast, _enable_a20_kbd, _enable_a20_xmm, die 1.5 msg_a20 db "Can't use A20",0 1.6 overflow db "Out of memory",0 1.7 + ifdef NO386 1.8 +bzimage86 db "No bzImage on 8086",0 1.9 + endif 1.10 global sssp:dword 1.11 global _initrd_desc:dword 1.12 _initrd_desc dd 90000218h 1.13 @@ -110,7 +113,13 @@ 1.14 mov cx,0fffh 1.15 extrn _pm_high:byte 1.16 test [_pm_high],cl 1.17 + je @zimage 1.18 + extrn _cpu386:byte 1.19 + test [_cpu386],cl 1.20 jne @bzimage 1.21 + mov bx,offset bzimage86 1.22 + jmp godie 1.23 +@zimage: 1.24 xchg ax,dx 1.25 cmp ax,cx 1.26 jae @sys@ok 1.27 @@ -138,6 +147,10 @@ 1.28 extrn _topseg:near 1.29 call near _topseg 1.30 mov [word sssp+2],ax 1.31 + and ch,0 1.32 + org $-1 1.33 + global _vcpi:byte 1.34 +_vcpi db ? 1.35 else 1.36 p386 1.37 movzx eax,[word _heap_top] 1.38 @@ -169,6 +182,8 @@ 1.39 @bzimage: 1.40 xchg ax,dx 1.41 mov ax,9000h 1.42 + extrn _vcpi:byte 1.43 + and ch,[_vcpi] 1.44 endif 1.45 add dh,ch ; room for malloc_bufv_or_die 1.46 cmp dx,ax 1.47 @@ -176,6 +191,7 @@ 1.48 @overflow: 1.49 ; Oops! We can stomp on our toes... better stop now 1.50 mov bx,offset overflow 1.51 +godie: 1.52 call near die 1.53 @nooverflow: 1.54 les cx,[bx-4] ; rm size