home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / c / cl5sr386.zip / GO32 / NOTES < prev    next >
Text File  |  1992-04-13  |  2KB  |  92 lines

  1. modules:
  2.  
  3.     a real-mode control program (code/data segments)
  4.     a 16-bit protected mode interface section
  5.     a 32-bit flat program arena, loaded from a.out file
  6.  
  7. control assist functions:
  8.  
  9.     All control assist functions use linear addresses, not segment addresses!
  10.  
  11. word32    peek32(vaddr)
  12.     poke32(vaddr, word32)
  13. word16    peek16(vaddr)
  14.     poke16(vaddr, word16)
  15. word8    peek8(vaddr)
  16.     poke8(vaddr, word8)
  17.     memget(vaddr, void *, length)
  18.     memput(vaddr, void *, length)
  19.  
  20. VCPU structure: (global var contains pointer to current VCPU)
  21.  
  22.     it's a TSS with extra stuff at the end
  23.     One TSS for control program state (unused but required)
  24.     One TSS for arena program state
  25.     others for other stuff
  26.  
  27.     Page faults cause task switches; other are regular interrupts
  28.     that jump through a TSS later
  29.  
  30. Interface routines:
  31.  
  32.     go32 - VCPU contains state to jump into
  33.       returns for exceptions and interrupts
  34.  
  35. GDT entries:
  36.  
  37.     <zero>
  38.     GDT
  39.     IDT
  40.     control code (use16)
  41.     control data (use16)
  42.     interface code (use32)
  43.     interface data (use32)
  44.     core memory (use32)
  45.     arena code (use32)
  46.     arena data (use32)
  47.     control TSS state
  48.     arena TSS state
  49.     other TSS state (for convenience functions)
  50.     page fault TSS state
  51.  
  52. Mappings:
  53.  
  54.     arena segments start at 0x10000000
  55.     core remapped to 0xF0000000 (0xE0000000 to arena)
  56.     VGA 256c paging at 0xE0000000 (0xD0000000 to arena)
  57.  
  58. Page management:
  59.  
  60.     bit-per-physical page map for free list
  61.     PT entry contains state and location information:
  62.      * present (inc. dirty, accessed)
  63.      * uninitialized
  64.      * paged to disk (includes block address)
  65.     bit-per-page map for disk swap free list
  66.  
  67. interrupts:
  68.  
  69.     int 21,AH=4A
  70.         AL=0 brk(ebx) returns old brk in eax
  71.         AL=1 sbrk(ebx) returns old brk in eax
  72.  
  73.     int 21,AH=FF - turbo assist.  Func in AL, parms (ebx,ecx,edx) ret eax
  74.     1: creat
  75.     2: open
  76.     3: fstat
  77.     4: gettimeofday
  78.     5: settimeofdat
  79.     6: stat
  80.     7: system
  81.  
  82.     int 10, AH=FF - set video mode
  83.     0: 80x25 text
  84.     1: default text
  85.     2: text CX cols by DX rows
  86.     3: biggest text
  87.     4: 320x200 graphics
  88.     5: default graphics
  89.     6: graphics CX width by DX height
  90.     7: biggest non-interlaced graphics
  91.     8: biggest graphics
  92.