亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? fat32.inc

?? MenuetOS是一個(gè)用匯編開發(fā)的32/64位PC操作系統(tǒng)
?? INC
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
    ret

  nohdcache:

    add  esi,8
    add  edi,1
    loop hdreadcache

    popa

    call  wait_for_hd_idle

    push  esi edi eax ebx ecx edx

    cli

    xor   eax,eax
    mov   edx,[hdbase]
    add   edx,1
    mov   al,0
    out   dx,al
    add   edx,1
    mov   al,1
    out   dx,al
    add   edx,1
    mov   al,[esp+12]
    out   dx,al
    add   edx,1
    mov   al,[esp+13]
    out   dx,al
    add   edx,1
    mov   al,[esp+14]
    out   dx,al
    add   edx,1
    mov   al,[esp+15]
    and   al,1+2+4+8
    mov   bl,byte [hdid]
    add   al,bl
    add   al,128+64+32
    out   dx,al
    add   edx,1
    mov   al,20h
    out   dx,al

    sti

    call  wait_for_sector_buffer

    cmp   [hd_error],0
    jne   hd_read_error

    cli

    mov   edi,[esp+8]
    mov   ecx,256
    mov   edx,[hdbase]
    cld
    rep   insw

    sti

    mov   esi,[esp+8]      ; move sector to cache
    mov   ecx,512

    mov   edi,0            ; write if the cache is full
    call  write_cache

    call  find_empty_slot  ; ret in edi

    cmp   edi,-1
    jne   founds
    call  find_empty_read_slot  ; ret in edi
  founds:

    push  edi

    shl   edi,9
    add   edi,0x600000+65536
    cld
    rep   movsb            ; move data

    pop   edi

    imul  edi,8
    add   edi,0x600000
    mov   eax,[esp+12]
    mov   [edi],eax        ; cluster number

    mov   [edi+4],dword 1  ; hd read - mark as same as in hd

  not_to_cache:

    pop   edx ecx ebx eax edi esi
    ret




;****************************************************************
hd_write_new:
; eax = block
; ebx = pointer to memory

    push edi
    mov  edi,0 ; write cache if full
    call write_cache
    pop  edi

    ; check if the cache already has the cluster and overwrite it

    pusha

    mov  ecx,cache_max
    mov  esi,0x600000+8
    mov  edi,1

  hdwritecache:

    cmp  [esi+4],dword 0 ; if cache slot is empty
    je   not_in_cache_write

    cmp  [esi],eax       ; if the slot has the cluster
    jne  not_in_cache_write

    mov  [esi+4],dword 2 ; write - differs from hd

    shl  edi,9
    add  edi,0x600000+65536
    mov  esi,ebx
    mov  ecx,512
    cld
    rep  movsb

    popa
    ret

  not_in_cache_write:

    add  esi,8
    add  edi,1
    loop hdwritecache

    ; block not found in cache
    ; write the block to a new location

    call  find_empty_slot ; ret in edi

    cmp   edi,-1
    jne   foundsw
    call  find_empty_read_slot  ; ret in edi
  foundsw:

    push  edi

    imul edi,8
    add  edi,0x600000

    mov  [edi+0],eax
    mov  [edi+4],dword 2

    pop  edi

    shl  edi,9
    add  edi,0x600000+65536
    mov  esi,ebx
    mov  ecx,512
    cld
    rep  movsb
    popa
    ret


write_cache:

    ; edi = 0 - write all only if the cache is full
    ; edi = 1 - write all

    pusha

    cmp  edi,0
    jne  no_check_for_full_cache

    mov  ecx,cache_max-15
    mov  esi,0x600000+8
    mov  edi,1

  cachel1:

    cmp  [esi+4],dword 2     ; if cache slot is different from hd
    jne  cachel2

    add  esi,8
    add  edi,1
    loop cachel1

    ; no empty slots found

    jmp  flush_cache

  cachel2:

    popa
    ret

  no_check_for_full_cache:


    ; edi = 1


  flush_cache:


    ; write difference ( 2 ) from cache to hd


    mov  ecx,cache_max
    mov  esi,0x600000+8
    mov  edi,1

  write_cache_more:

    cmp  [esi+4],dword 2 ; if cache slot is not different
    jne  does_not_need_writing

    mov  [esi+4],dword 1 ; same as in hd

    ; give parameters

    pusha

    mov  eax,[esi+0]  ; eax = cluster to write

    mov  ebx,edi
    imul ebx,512
    add  ebx,0x600000+65536

                      ; ebx = from memory position

    cmp  eax,[PARTITION_START]
    jb   danger
    cmp  eax,[PARTITION_END]
    ja   danger

    call  wait_for_hd_idle

    push  esi    ; [esp+12] +13 +14 +15
    push  eax    ; [esp+8]  +9  +10 +11
    push  ecx    ; [esp+4]  +5 +6 +7
    push  edx    ; [esp]    +1 +2 +3

    cli

    xor   eax,eax
    mov   edx,[hdbase]
    inc   edx
    out   dx,al
    inc   edx
    mov   al,1
    out   dx,al
    inc   edx
    mov   al,[esp+8]
    out   dx,al
    inc   edx
    mov   al,[esp+9]
    out   dx,al
    inc   edx
    mov   al,[esp+10]
    out   dx,al
    inc   edx
    mov   al,[esp+11]
    and   al,1+2+4+8
    add   al,byte [hdid]
    add   al,128+64+32
    out   dx,al
    inc   edx
    mov   al,30h
    out   dx,al

    sti

    call  wait_for_sector_buffer

    cmp   [hd_error],0
    jne   hd_write_error

    cli

    mov   esi,ebx
    mov   ecx,256
    mov   edx,[hdbase]
    cld
    rep outsw

    sti

    pop edx
    pop ecx
    pop eax
    pop esi

  danger:

    popa

  does_not_need_writing:

    add  esi,8
    add  edi,1
    dec  ecx
    jnz  write_cache_more

    popa
    ret


find_empty_slot:

    push eax ebx ecx edx esi

    mov  ecx,cache_max
    mov  esi,0x600000+8
    mov  edi,1

  search_for_empty:

    cmp  [esi+4],dword 0 ; if cache slot is empty
    je   found_empty_slot

    add  esi,8
    add  edi,1
    loop search_for_empty

    mov  edi,-1

    ; jmp  $ ; should not happen

  found_empty_slot:

    pop  esi edx ecx ebx eax

    ret


fat_search_start dd 0x0

find_empty_read_slot:

    push eax ebx ecx edx esi

  new_read_search:

    inc  dword [fat_search_start]
    cmp  [fat_search_start],cache_max-10
    jb   sok
    mov  [fat_search_start],0
  sok:

    mov  ecx,cache_max
    mov  esi,0x600000+8
    mov  edi,1

  search_for_empty_read:

    cmp  edi,[fat_search_start]
    jb   next_cache

    cmp  [esi+4],dword 1 ; if cache slot is used for reading
    je   found_empty_read_slot

  next_cache:

    add  esi,8
    add  edi,1
    loop search_for_empty_read

    mov  edi,1
    call write_cache

    mov  [fat_search_start],dword 0

    jmp  new_read_search

  found_empty_read_slot:

    pop  esi edx ecx ebx eax

    ret


hd_wait_timeout: dd 0x0


save_hd_wait_timeout:

    push  eax

    mov   eax,[0xfdf0]      
    add   eax,300           ; 3 sec timeout
    mov   [hd_wait_timeout],eax

    pop   eax

    ret


check_hd_wait_timeout:

    push  eax

    mov   eax,[hd_wait_timeout]
    cmp   [0xfdf0],eax
    jg    hd_timeout_error

    pop   eax

    ret


hd_timeout_str   db 'K : FS - HD timeout',13,10,0
hd_read_str      db 'K : FS - HD read error',13,10,0
hd_write_str     db 'K : FS - HD write error',13,10,0


hd_timeout_error:

    call  clear_hd_cache
    call  clear_application_table_status
    mov   esi,hd_timeout_str
    call  sys_msg_board_str
    jmp   $


hd_read_error:

    call  clear_hd_cache
    call  clear_application_table_status
    mov   esi,hd_read_str
    call  sys_msg_board_str
    jmp   $

hd_write_error:

    call  clear_hd_cache
    call  clear_application_table_status
    mov   esi,hd_write_str
    call  sys_msg_board_str
    jmp   $




wait_for_hd_idle:

    push  eax
    push  edx

    call  save_hd_wait_timeout

    mov   edx,[hdbase]
    add   edx,0x7
  wfhil1:

    call  check_hd_wait_timeout

    in    al,dx
    test  al,128
    jnz   wfhil1

    pop   edx
    pop   eax
    ret


wait_for_sector_buffer:

    push  eax edx

    mov   edx,[hdbase]
    add   edx,0x7

    call  save_hd_wait_timeout

  hdwait_sbuf:              ; wait for sector buffer to be ready

    call  check_hd_wait_timeout

    in    al,dx
    test  al,8
    jz    hdwait_sbuf

    mov   [hd_error],0

    cmp   [hd_setup],1      ; do not mark error for setup request
    je    buf_wait_ok

    test  al,1              ; previous command ended up with an error
    jz    buf_wait_ok
    mov   [hd_error],1

  buf_wait_ok:

    pop   edx eax

    ret



read_hd_file:
;-----------------------------------------------------------------
;
; Converting old reading function for hd-application start.
;
; IN:
;
; eax - pointer to file (0 = read only first sector of drive: eg 'label')
; ebx - file lenght
; ecx - start 512 byte block number
; edx - number of blocks to read
; esi - pointer to return/work area (atleast 20 000 bytes)
;
; For new read function
;
; EAX   (PAR0)      pointer to file-name   PAR0
; ECX   (PAR1)      pointer to buffer      PAR1
; EBX   (PAR2)   vt file blocks to read    PAR2
; EDX   (PAR3)      pointer to path        PAR3
; ESI            vt first 512 block to read
; EDI               if 0 - return root
;--------------------------------------------------------------------------

     pusha
     mov  esi,eax
     mov  edi,startpath
     mov  ecx,250
     cld
     rep  movsb
     popa

     mov  eax,startpath
     add  eax,ebx
     sub  eax,12
     mov  [eax],byte 0
     mov  eax,startpath

     push eax ebx ecx edx esi

     pop  ecx ; pointer to buffer
     add  ecx,1024
     pop  ebx ; number of blocks to read
     pop  esi ; first block to read
     dec  esi
     pop  eax ; file length
     pop  edx ; pointer to path

     mov  edi,12

     add  eax,edx
     sub  eax,12
     inc  eax

     call file_read

     ret

startpath: times 255 db 0

;***********************
;*         Start       *
;* Mario79 edited code *
;*  correct free mem   *
;*     change 1.6      *
;***********************
hd_write_new_sys:
; eax = block
; ebx = pointer to memory
   
    cmp  eax,[PARTITION_START]
    jb   danger_1
    cmp  eax,[PARTITION_END]
    ja   danger_1
   
    call  wait_for_hd_idle
   
    push  esi    ; [esp+12] +13 +14 +15
    push  eax    ; [esp+8]  +9  +10 +11
    push  ecx    ; [esp+4]  +5 +6 +7
    push  edx    ; [esp]    +1 +2 +3
   
    cli
   
    xor   eax,eax
    mov   edx,[hdbase] 
    inc   edx
    out   dx,al
    inc   edx
    mov   al,1 
    out   dx,al
    inc   edx
    mov   al,[esp+8] 
    out   dx,al
    inc   edx
    mov   al,[esp+9]
    out   dx,al
    inc   edx
    mov   al,[esp+10]
    out   dx,al
    inc   edx
    mov   al,[esp+11]
    and   al,1+2+4+8
    add   al,byte [hdid]
    add   al,128+64+32
    out   dx,al
    inc   edx
    mov   al,31h 
    out   dx,al

    sti

hdwait_write:
    in    al,dx
    and   al,128
    jnz    hdwait_write

    cli

    mov   esi,ebx
    mov   ecx,256
    mov   edx,[hdbase]

    cld
    rep outsw
   
    sti

    pop edx
    pop ecx
    pop eax
    pop esi
danger_1:
    ret   
;***********************
;*          End        *
;* Mario79 edited code *
;*  correct free mem   *
;*     change 1.6      *
;***********************

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲超丰满肉感bbw| 91亚洲精品乱码久久久久久蜜桃| 亚洲高清视频在线| 亚洲一区av在线| 伊人色综合久久天天人手人婷| 亚洲欧美日韩国产中文在线| 亚洲人成在线观看一区二区| 亚洲天堂免费看| 亚洲品质自拍视频| 一区二区三区四区不卡视频| 亚洲一区二区三区在线看| 午夜精品福利一区二区蜜股av | 国产免费观看久久| 久久网站最新地址| 久久久91精品国产一区二区三区| 久久久精品综合| 中文字幕在线不卡| 亚洲一区二区四区蜜桃| 日韩不卡一二三区| 精品一区二区三区免费观看| 国产一区二区三区观看| av午夜精品一区二区三区| 在线中文字幕一区二区| 在线综合视频播放| 久久网这里都是精品| 1024成人网| 丝袜a∨在线一区二区三区不卡 | 欧美精品久久99| 欧美sm极限捆绑bd| 国产精品国模大尺度视频| 亚洲国产欧美在线人成| 麻豆精品精品国产自在97香蕉 | 久久久99精品免费观看| 国产精品国模大尺度视频| 亚洲大片在线观看| 国产精品系列在线观看| 日本道精品一区二区三区| 91精品国产美女浴室洗澡无遮挡| 欧美精品一区二区高清在线观看| 国产日本欧美一区二区| 亚洲综合图片区| 国产美女精品人人做人人爽| 一本色道久久加勒比精品| 91精品国产综合久久久久久漫画| 久久久不卡网国产精品二区| 亚洲欧美日韩国产综合| 国产综合一区二区| 欧美日韩日日摸| 国产午夜精品一区二区| 天堂午夜影视日韩欧美一区二区| 国产精品1024| 欧美乱妇一区二区三区不卡视频| 久久综合九色综合97_久久久 | 国产69精品久久99不卡| 欧美中文字幕一区二区三区亚洲| 精品国精品国产尤物美女| 有坂深雪av一区二区精品| 国产麻豆日韩欧美久久| 欧美日韩激情一区二区| 中文字幕中文字幕在线一区| 人人狠狠综合久久亚洲| 99久久精品一区二区| 精品国产一区二区三区忘忧草| 一区二区三区四区激情| 成人午夜视频免费看| 精品久久久久久久久久久久久久久 | 日韩欧美一级二级三级久久久| 亚洲久本草在线中文字幕| 国模大尺度一区二区三区| 欧美日韩不卡一区二区| 中文字幕制服丝袜一区二区三区| 美国毛片一区二区| 欧美三区免费完整视频在线观看| 中文字幕av一区二区三区| 麻豆视频一区二区| 欧美日韩国产区一| 亚洲综合在线第一页| 91香蕉视频黄| 国产精品久久久久国产精品日日| 精品一区二区三区免费视频| 69p69国产精品| 亚洲午夜激情网页| 99re成人精品视频| 中文字幕在线不卡| 成人不卡免费av| 国产精品女人毛片| 成人午夜看片网址| 国产亚洲欧美一级| 国内精品国产成人国产三级粉色| 日韩精品一区二区三区视频在线观看| 亚洲成人7777| 欧美区视频在线观看| 亚洲第一久久影院| 欧美少妇性性性| 亚洲第一成年网| 在线电影一区二区三区| 亚洲高清免费视频| 欧美日韩一二区| 天天av天天翘天天综合网 | 中文一区二区在线观看| 国产在线精品不卡| 久久精品亚洲乱码伦伦中文| 亚洲国产精品久久久久婷婷884| 久草在线在线精品观看| 日韩一区二区三区视频| 日韩1区2区3区| 欧美tickling网站挠脚心| 久久超碰97人人做人人爱| 日韩女同互慰一区二区| 精品一区二区三区视频| 国产欧美日韩综合精品一区二区| 国产一区二区三区免费看| 国产日韩欧美a| 成人国产免费视频| 一区二区三区欧美在线观看| 欧美午夜在线一二页| 亚洲不卡av一区二区三区| 欧美一级高清片| 国产老女人精品毛片久久| 中文字幕欧美激情一区| 一本久久综合亚洲鲁鲁五月天| 一区二区高清免费观看影视大全| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 亚洲一区av在线| 精品日韩一区二区三区| 成人在线视频首页| 亚洲一区二区三区四区五区中文| 7777精品伊人久久久大香线蕉超级流畅| 免费看日韩精品| 欧美高清在线一区| 在线精品视频免费播放| 麻豆国产欧美日韩综合精品二区| 久久久不卡网国产精品二区| 一本到不卡免费一区二区| 五月天一区二区三区| 欧美精品一区二区三区在线播放 | 欧洲av一区二区嗯嗯嗯啊| 日日夜夜免费精品| 国产欧美在线观看一区| 91社区在线播放| 美女国产一区二区| 亚洲视频免费在线观看| 7777精品伊人久久久大香线蕉| 国产精品一区二区x88av| 亚洲免费资源在线播放| 日韩欧美国产综合在线一区二区三区| 处破女av一区二区| 日韩电影一区二区三区四区| 国产欧美日韩精品在线| 精品视频在线免费看| 国产成人激情av| 五月婷婷久久综合| 国产精品大尺度| 欧美成人三级电影在线| 色综合天天综合色综合av| 欧美视频一区二区三区四区| 九一九一国产精品| 一区二区三区免费| 欧美国产精品专区| 欧美大白屁股肥臀xxxxxx| 91在线观看美女| 国产真实乱对白精彩久久| 亚洲一区在线播放| 国产精品色呦呦| 欧美大片一区二区三区| 欧美午夜一区二区| 成人蜜臀av电影| 久久av老司机精品网站导航| 亚洲精品国产a| 国产精品理论片| 26uuu国产日韩综合| 欧美日韩精品二区第二页| 91色乱码一区二区三区| 国产乱色国产精品免费视频| 日韩av中文字幕一区二区| 亚洲免费av网站| 国产精品区一区二区三区| 久久免费看少妇高潮| 日韩美一区二区三区| 欧美日韩国产高清一区二区三区 | 欧美图片一区二区三区| 成人亚洲精品久久久久软件| 蜜桃视频免费观看一区| 亚洲成人一区二区在线观看| 亚洲丝袜美腿综合| 中文字幕在线观看不卡| 国产欧美一区二区三区鸳鸯浴| 91精品国产综合久久久蜜臀图片| 欧美亚洲另类激情小说| 日本精品一级二级| aa级大片欧美| www.亚洲人| 成人一区二区三区中文字幕| 国产专区欧美精品| 久久精品国产免费| 久久99精品久久久久久| 另类的小说在线视频另类成人小视频在线 | av高清不卡在线| 成人午夜碰碰视频| 成人黄色777网|