⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 patcher.asm

📁 一个朋友写的操作系统源码
💻 ASM
字号:

include const.inc
include comstruc.inc

sseg segment stack

     db 128 dup (0)

sseg ends

dseg segment para public 'global'

     ;Global varibles store here
     ;May be linked to other modual

     public parambuf,paramnr,inodeblk,superblk,zonespace
     public dirp,fn,dbuf,prom

     superblk equ this byte       ; superblk is used once, just multiplex
     zonespace db 1024 dup (0)    ; in floppy fs, block = zone
     parambuf  db 4096 dup (0)    ; store the character read from config file
     paramnr   dw 0               ; init to 0
     inodeblk  db 1024 dup (0)    ; block incore version
     dirp      dw 0               ; path character indicator
     fn        dw 0               ; files have been processed
     dbuf      db 14 dup (0)      ; current pathname component
     prom      db '%d files have been converted!','$'

dseg ends

overlap segment para common 'strucinfo'

        ; this is the only way to reference
        ; extern struct

        inodeinfo minixinode <>
        superinfo minixsuper <>
        dent      dirent     <>

overlap ends

cseg segment para public 'code'

     extrn panic:near
     extrn rdconfig:near
     extrn getinode:near
     extrn getsuper:near
     extrn getzone:near
     extrn printn:near
     extrn printf:near
     extrn eatpath:near

     extrn patchfs:near

     assume cs:cseg,ds:dseg,es:dseg,ss:sseg

start:
     mov ax,dseg
     mov ds,ax
     mov es,ax

     call patchfs

     mov ah,4ch
     int 21h

cseg ends

end start

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -