; Note: this code assumes the adapter is set to XGA instance 6, video ROM @ seg. C000h ; ----------------------------------------------------------------------------- ; make Nth ROM section visible to host ;------------------------------------------------------------------------------ mov dx, 216Ah ; DX - 21xAh: XGA Index Register I/O address out dx, al mov al, 71h ; XGA reg. idx 71h - ROM paging out dx, al inc dl ; DX - 21xBh: Data Register 0 xor al, al ; 0 - map ROM offset 0 to host out dx, al ; wait for the mapped ROM area to switch FROM offset 6000h (optional) mov ax, C000h push ax pop ds ; DS = C000h check_again: mov al, ds:0 ; C000:0h cmp al, 55h ; 55h - value of first byte of mapped ROM (55AAh magic) jz short check_again ; ----------------------------------------------------------------------------- ; make XGA-2 ROM section visible to host ;------------------------------------------------------------------------------ mov dx, 216Ah ; DX - 21xAh: XGA Index Register I/O address out dx, al mov al, 71h ; XGA reg. idx 71h - ROM paging out dx, al inc dl ; DX - 21xBh: Data Register 0 mov al, 3fh ; 3fh - map ROM offset 6000h to host out dx, al ; wait for the mapped ROM area to switch TO offset 6000h (optional) mov ax, C000h push ax pop ds ; DS = C000h check_again: mov al, ds:0 ; C000:0h cmp al, 55h ; 55h - value of first byte of mapped ROM (55AAh magic) jnz short check_again