home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / CDOSDSK5.ZIP / CDOSDSK5.TD0 / XIOS / FLUSH.A86 < prev    next >
Encoding:
Text File  |  1989-01-26  |  3.6 KB  |  152 lines

  1.  
  2. title 'CDOS 386 Flush process'
  3.  
  4. ;*****************************************************
  5. ;*
  6. ;*             FLUSH RSP
  7. ;*
  8. ;* CDOS 386 flush process, used to call the XIOS
  9. ;* IO_SCREEN_FLUSH routines to output screen buffers
  10. ;* to serial consoles.
  11. ;*
  12. ;*****************************************************
  13.  
  14.  
  15.  
  16. rlr        equ    68H    ; Ready List Root
  17.  
  18. xiosentry    equ    28H    ; offset of double word pointer in
  19.                 ; the system data segment of XIOS entry
  20.  
  21.     ; XIOS functions
  22.  
  23. io_flush_io    equ    51    ; XIOS flush routine
  24.  
  25.     ; PD fields
  26.  
  27. p_uda    equ    10h    ; offset of UDA segment in PD
  28.  
  29. ps_run  equ     0       ; PD run status
  30. pf_keep equ     2       ; PD nokill flag
  31.  
  32.  
  33.     ; RSP format
  34.  
  35. rsp_top equ     0       ; rsp offset
  36. rsp_pd  equ     010h    ; PD offset
  37. rsp_uda equ     040h    ; UDA offset
  38.  
  39. rsp_bottom equ  140h    ; end rsp header
  40.  
  41. ;*****************************************************
  42. ;*
  43. ;*    FLUSH CODE SEGMENT
  44. ;*
  45. ;*****************************************************
  46.  
  47.     cseg
  48.     org    0
  49.  
  50.  
  51. flush:        ; Flush process starts here
  52.     mov    dl,p_cns        ; get our virtual console number
  53.     mov    ax,io_flush_io        ; go to flush code
  54. ; XIOS entry routine
  55. xios:
  56.     mov     ds,sysdat
  57.     mov     si,.rlr 
  58.     mov     es,p_uda[si]
  59.     jmpf     dword ptr .xiosentry    ; all done by XIOS module
  60.  
  61.  
  62. ;*****************************************************
  63. ;*
  64. ;*    Data Segment
  65. ;*
  66. ;*****************************************************
  67.  
  68.     dseg
  69.     org     0
  70.  
  71. sysdat    dw    0
  72.     dw    0        ; pointer to number of incarnations (in SYSDAT)
  73. pcon    db    0        ; physical console number (Copy Index - 0 based)
  74.     db    0
  75.         dw    0,0
  76.  
  77. RSF_DYNAMIC    equ    0001h            ; create at boot time
  78. RSF_NONBANK    equ    0002h            ; allocate non-banked
  79. RSF_SPECIAL    equ    0004h            ; requires separate code
  80. RSF_ENVIRON    equ    0008h            ; requires large environment
  81.  
  82.     dw    0        ; flags (set Dynamic bit)
  83.  
  84.         dw    0,0
  85.  
  86.     org    rsp_pd
  87.  
  88.         dw      0,0             ; link,thread
  89.         db      ps_run          ; status
  90.         db      180             ; priority (beats everybody)
  91.         dw      pf_keep         ; flags
  92.         db      'Flush1  '         ; name
  93.     dw      rsp_uda/10h      ; uda seg
  94.         db      0,0,0,0        ; dsk,usr,ldsk,luser
  95.         dw      0        ; mem partitions
  96.         dw      0,0             ; dvract,wait
  97.         db    0,0        ; org,net
  98.     dw      0               ; parent
  99. p_cns    db    4,0,0,0        ; cns,abort,cin,cout
  100.     db    0,0,0,0        ; lst,sf3,sf4,sf5
  101.     dw    0,0,0,0        ; reserved,pret,scratch
  102.  
  103.     org    rsp_uda
  104.  
  105. uda        dw    0,0,0,0            ;0-7 note: no default DMA
  106.         dw    0,0,0,0            ;8-fh
  107.         dw    0,0,0,0            ;10-17
  108.         dw    0,0,0,0            ;18-1f
  109.         dw    0,0,0,0            ;20-27
  110.         dw    0,0,0,0            ;28-2f
  111.         dw    0,0,offset stack_top,0    ;30-37
  112.         dw    0,0,0,0            ;38-3f
  113.         dw    0,0,0,0            ;40-47
  114.         dw    0,0,0,0            ;48-4f
  115.         dw    0,0,0,0            ;50-57
  116.         dw    0,0,0,0            ;58-5f
  117.         db    1            ;60 INSYS <> 0
  118.                         ;don't switch from
  119.                         ;from UDA stack
  120.                         ;on entry to SUP
  121.         db    0
  122.  
  123.     dw    0cccch,0cccch,0cccch        ;62-67
  124.     dw    0cccch,0cccch,0cccch,0cccch    ;68-6F
  125.     dw    0cccch,0cccch,0cccch,0cccch    ;70
  126.     dw    0cccch,0cccch,0cccch,0cccch
  127.     dw    0cccch,0cccch,0cccch,0cccch    ;80
  128.     dw    0cccch,0cccch,0cccch,0cccch
  129.     dw    0cccch,0cccch,0cccch,0cccch    ;90
  130.     dw    0cccch,0cccch,0cccch,0cccch
  131.     dw    0cccch,0cccch,0cccch,0cccch    ;A0
  132.     dw    0cccch,0cccch,0cccch,0cccch
  133.     dw    0cccch,0cccch,0cccch,0cccch    ;B0
  134.     dw    0cccch,0cccch,0cccch,0cccch
  135.     dw    0cccch,0cccch,0cccch,0cccch    ;C0
  136.     dw    0cccch,0cccch,0cccch,0cccch
  137.     dw    0cccch,0cccch,0cccch,0cccch    ;D0
  138.     dw    0cccch,0cccch,0cccch,0cccch
  139.     dw    0cccch,0cccch,0cccch,0cccch    ;E0
  140.     dw    0cccch,0cccch,0cccch,0cccch
  141.     dw    0cccch,0cccch,0cccch,0cccch    ;F0
  142.     dw    0cccch
  143.  
  144. stack_top    dw    offset flush    ; code starting point
  145.         dw    0        ; code seg - set by GENSYS
  146.         dw    0        ; init. flags - set by GENSYS
  147.  
  148.                     ; UDA is 100H bytes long
  149.     end
  150.  
  151.  
  152.