Displaying 1 result from an estimated 1 matches for "040111o".
Did you mean:
001113
2009 Mar 01
0
[PATCH 1/3] COMBOOT API: Improve readdir
...te
+;
+; Returns st_mode
+; DX st_mode
+;
+
+fatattr_to_st_mode:
+ push eax
+ test dl,0xC8 ; 0x80 Unknown 0x40 Device(Internal)
+ ; 0x08 Label
+ jnz .zero
+ mov ax,0444o
+ test dl,1 ; 1 ReadOnly
+ jnz .is_ro
+ add ax,0222o
+.is_ro:
+ test dl,0x10 ; 0x10 Directory
+ jz .not_dir
+ add ax,040111o ; Dir and Execute
+ jmp .done
+.not_dir:
+ add ax,0100000o ; Regular file
+.done:
+ mov dx,ax
+ jmp .end
+.zero: ; Any condition that will result in an all zero return
+ mov dx,0
+.end:
+ pop eax
+ ret
+
+;
; readdir: Read one file from a directory
;
; ES:DI -> String buffer (filename...