?login_element?

Subversion Repositories NedoOS

Rev

Rev 1459 | Rev 1999 | Go to most recent revision | 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.         push hl
  10.         push bc ; not for exit
  11.         push de ; not for exit
  12.         ld c, CMD_GETMAINPAGES
  13.         push ix
  14.         push iy
  15.         call BDOS
  16.         pop iy
  17.         pop ix 
  18.         ld (pg4),de
  19.         ld (pgC),hl
  20.  
  21. display:
  22.         ld e, 0x83
  23.         ld c, CMD_SETGFX
  24.         push ix
  25.         push iy
  26.         call  BDOS
  27.         pop iy
  28.         pop ix
  29.        
  30.         ld a,(user_scr0_high)
  31.        
  32.         push ix
  33.         push iy
  34.         rst 0x28
  35.         pop iy
  36.         pop ix
  37.        
  38.     pop hl
  39.         ld de, 0xC000
  40.         ld bc, 6912
  41.         ldir
  42.     xor a
  43.         out (0xfe), a
  44.  
  45.         pop bc
  46.         ld a, b
  47.     or c
  48.     jp nz, slideshow
  49.        
  50. inkey
  51.         ld c, CMD_YIELD
  52.         push ix
  53.         push iy
  54.         call  BDOS
  55.         pop iy
  56.         pop ix
  57.        
  58.         push ix
  59.         push iy
  60.         rst 0x08
  61.         pop iy
  62.         pop ix 
  63.  
  64.         ld a,c
  65.         ld (pg0), a
  66.         cp 00
  67.         jp z, inkey
  68. exit3
  69.         ld l, c
  70.         ld e, -1
  71.         ld c, CMD_SETGFX
  72.         push ix
  73.         push iy
  74.         call BDOS
  75.         pop iy
  76.         pop ix
  77.         ld a, (pgC)
  78.         push ix
  79.         push iy
  80.         rst 0x28
  81.         pop iy
  82.         pop ix
  83.         pop hl
  84.         ld a, (pg0)    
  85.         ret
  86.  
  87. slideshow ;BC ints
  88.         dec bc
  89.         ld (waiting),bc
  90.  
  91. inkey2
  92.         ld c, CMD_YIELD
  93.         push ix
  94.         push iy
  95.         call  BDOS
  96.         pop iy
  97.         pop ix
  98.        
  99.         push ix
  100.         push iy
  101.         rst 0x08
  102.         pop iy
  103.         pop ix 
  104.  
  105.         ld a,c
  106.         ld (pg0), a
  107.         cp 00
  108.     jp nz, exit3       
  109.  
  110.         ld bc,(waiting)
  111.         ld a, b
  112.     or c
  113.     jp nz, slideshow
  114.  
  115.         ld a, 32
  116.         ld (pg0), a
  117.         jp exit3       
  118. pg4             defb 0
  119. pg0             defb 0
  120. pgC             defb 0
  121. pg8             defb 0
  122. waiting defw 0
  123. ENDMOD
  124. END
  125.