?login_element?

Subversion Repositories NedoOS

Rev

Rev 1999 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. MODULE viewScreen6912
  2. PUBLIC viewScreen6912
  3. #include "sysdefs.asm"
  4. RSEG CODE
  5.  
  6. viewScreen6912:
  7. ; unsigned int viewScreen6912(unsigned char pause, unsigned int bufAdr);
  8. ; DE = buffer adress BC = time in ints out A = key
  9.         xor a
  10.         ld (pg0), a
  11.         push hl
  12.         push bc ; not for exit
  13.         push de ; not for exit
  14.         ld c, CMD_GETMAINPAGES
  15.         push ix
  16.         push iy
  17.         call BDOS
  18.         pop iy
  19.         pop ix 
  20.         ld (pg4),de
  21.         ld (pgC),hl
  22. display:
  23.         ld e, 0x83
  24.         ld c, CMD_SETGFX
  25.         push ix
  26.         push iy
  27.         halt
  28.         call  BDOS
  29.         pop iy
  30.         pop ix
  31.        
  32.         ld a,(user_scr0_high)
  33.        
  34.         push ix
  35.         push iy
  36.         rst 0x28
  37.         pop iy
  38.         pop ix
  39.        
  40.     pop hl                      ; DE - buffer adress
  41.         ld de, 0xC000
  42.         ld bc, 6912
  43.         ldir
  44.     xor a
  45.         out (0xfe), a
  46.  
  47.         pop bc                  ; tics
  48.         ld a, b
  49.     or c
  50.     jp nz, slideshow
  51.        
  52. inkey
  53.         ld c, CMD_YIELD
  54.         push ix
  55.         push iy
  56.         call  BDOS
  57.         pop iy
  58.         pop ix
  59.        
  60.         push ix
  61.         push iy
  62.         rst 0x08
  63.         pop iy
  64.         pop ix
  65.         halt
  66.         halt
  67.         jp nz, inkey
  68.         ld a,c
  69.         or a
  70.         jp z, inkey
  71.  
  72. exit3
  73.         ld (pg0), a
  74.         ld e, -1
  75.         ld c, CMD_SETGFX
  76.         push ix
  77.         push iy
  78.         halt
  79.         call BDOS
  80.         pop iy
  81.         pop ix
  82.         ld a, (pgC)
  83.         push ix
  84.         push iy
  85.         rst 0x28
  86.         pop iy
  87.         pop ix
  88.         pop hl
  89.         ld a, (pg0)
  90.         halt
  91.         ret
  92.  
  93. slideshow ;BC ints
  94.         dec bc
  95.         ld (waiting),bc
  96.  
  97.         push ix
  98.         push iy
  99.         rst 0x08
  100.         pop iy
  101.         pop ix 
  102.         ld a,c
  103.         or a
  104.     jp nz, exit3       
  105.         halt
  106.         ld bc,(waiting)
  107.         ld a, b
  108.     or c
  109.     jp nz, slideshow
  110.         ld a, 32
  111.         jp exit3       
  112. pg4             defb 0
  113. pg0             defb 0
  114. pgC             defb 0
  115. pg8             defb 0
  116. waiting defw 0
  117. ENDMOD
  118.  
  119. MODULE rst0x08
  120. PUBLIC rst0x08
  121. #include "sysdefs.asm"
  122. RSEG CODE
  123. rst0x08:       
  124.         push ix
  125.         push iy
  126.         rst 0x08
  127.         pop iy
  128.         pop ix
  129.         ld a,c
  130.         ret
  131. ENDMOD 
  132. END
  133.