::SHE+ILA:: Kernel ASM Source [6] -- Buffer Handling

84
0
  • Squishy Plushie's avatar Artist
    Squishy Pl...
  • DDG Model
    Z-Image Turbo
  • Access
    Public
  • Created
    1w ago
  • Try

Prompt

A beautiful purple-haired ragdoll wearing a long purple velvet ankle-length dress with flouncy sleeves and purple suede high heels. Behind her are several racks of pigeon holes.

More about ::SHE+ILA:: Kernel ASM Source [6] -- Buffer Handling

// We now come to the Buf Handling code. This goes on for quite a while (lol).
// These are in the Kernel to prevent concurrent conflicting changes by multiple user threads,
// and to prevent unauthorized buffer modifications destroying data integrity.
// Declare some macros
NearBufHdr <:: (= $EB:8; bufflags:8; bufwidth:8; veclen16:16; maxbuflen16:16 =)
FarBufHdr <:: (= $EB:8; bufflags:8; bufwidth:8; veclen32:32; maxbuflen32:32 =)
NearDopeVecElem <:: (= offset16:16; length16:16 =)
FarDopeVecElem <:: (= offset32:32; length32:32 =)
BufFlags <:: (- dirty=1, untidy=2, readonly=4, symtab=8, markov=16, auditable=32, nonswap=64, far'near=128 -); // Boolean additive
// Buf headers are put at the beginning of a page, small data items at the middle,
// and large data items at the end of the page (pointed to by the dope vectors).
{_ // Begin ASM block
FBI: _PROC; // Entry point from INT $48 after switching to Kernel mode
// AH contains function code in $00_$1E, params in other regs as appropriate
// Typically ES has the page frame selector, EBX points to the Buf, and EDX has subscript or length
_AND EAX, $00001E00; // Isolate AH function code
_SHR EAX,8; // Align for use as jump index
_ADD EAX,JUMPTABLE
_MOV ESI,EAX
_ASSERT ES:EBX,$EB; // Debugging test for valid buffer start
_JMP CS:[ESI]
JUMPTABLE: _DW FCLEAR, FSPECIFY, FINSERT, FEXTRACT
_DW FWAITEMPTY, FWAITFULL, FCHOOSE, FINDXSTORE
_DW FLENGTH, FREDUCE, FEXPRESS, FINSTANTIATE
_DW FRESHAPE, FREVERSE, FROTATE, FTRANSPOSE
_} // End ASM block
// *** Much more to follow -- Call the FBI! (Fundamental Buffer Interface, INT $48) ***

Comments


Loading Dream Comments...

Discover more dreams from this artist