|
Lines 286-291
Link Here
|
| 286 |
; != 0 -> graphics active |
286 |
; != 0 -> graphics active |
| 287 |
gfx_ok db 0 |
287 |
gfx_ok db 0 |
| 288 |
gfx_cwritestr_old db 0c3h ; 'ret' |
288 |
gfx_cwritestr_old db 0c3h ; 'ret' |
|
|
289 |
gfx_cpio_swab db 0 |
| 289 |
|
290 |
|
| 290 |
gfx_mem_start_seg dw 0 |
291 |
gfx_mem_start_seg dw 0 |
| 291 |
gfx_mem_end_seg dw 0 |
292 |
gfx_mem_end_seg dw 0 |
|
Lines 920-934
Link Here
|
| 920 |
|
921 |
|
| 921 |
lin2segofs edi,es,bx |
922 |
lin2segofs edi,es,bx |
| 922 |
cmp word [es:bx],71c7h |
923 |
cmp word [es:bx],71c7h |
|
|
924 |
jz find_file_30 ; normal cpio record |
| 925 |
cmp word [es:bx],0c771h ; maybe byte-swapped? |
| 923 |
jnz find_file_90 ; no cpio record |
926 |
jnz find_file_90 ; no cpio record |
|
|
927 |
mov byte [gfx_cpio_swab],1 |
| 924 |
|
928 |
|
| 925 |
movzx esi,word [es:bx+20] ; file name size |
929 |
find_file_30: |
|
|
930 |
mov ax,[es:bx+20] ; file name size |
| 931 |
call cpio_swab |
| 932 |
movzx esi,ax |
| 926 |
|
933 |
|
| 927 |
inc si |
934 |
inc si |
| 928 |
and si,~1 ; align |
935 |
and si,~1 ; align |
| 929 |
|
936 |
|
| 930 |
mov ecx,[es:bx+22] ; data size |
937 |
mov ax,[es:bx+22] ; data size, MSW |
| 931 |
rol ecx,16 ; get word order right |
938 |
call cpio_swab |
|
|
939 |
mov cx,ax |
| 940 |
shl ecx,16 |
| 941 |
mov ax,[es:bx+24] ; data size, LSW |
| 942 |
call cpio_swab |
| 943 |
mov cx,ax |
| 932 |
|
944 |
|
| 933 |
inc ecx |
945 |
inc ecx |
| 934 |
and ecx,byte ~1 ; align |
946 |
and ecx,byte ~1 ; align |
|
Lines 950-955
Link Here
|
| 950 |
|
962 |
|
| 951 |
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
963 |
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 952 |
; |
964 |
; |
|
|
965 |
; byte-swap cpio data if appropriate |
| 966 |
; |
| 967 |
; ax: word to swap |
| 968 |
; |
| 969 |
; return: ax: swapped if [gfx_cpio_swab], otherwise same as input |
| 970 |
; |
| 971 |
cpio_swab: |
| 972 |
cmp byte [gfx_cpio_swab],0 |
| 973 |
jz cpio_swab_90 |
| 974 |
xchg ah,al |
| 975 |
|
| 976 |
cpio_swab_90: |
| 977 |
ret |
| 978 |
|
| 979 |
|
| 980 |
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 981 |
; |
| 953 |
; es:bx file start |
982 |
; es:bx file start |
| 954 |
; |
983 |
; |
| 955 |
; return: eax: offset to code entry |
984 |
; return: eax: offset to code entry |