?login_element?

Subversion Repositories NedoOS

Rev

Rev 1004 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.  
  2.     MODULE TextMode
  3. pg4     defb 0
  4. pg0     defb 0
  5. pgC     defb 0
  6. pg8     defb 0
  7. init
  8.         ld c,nos.CMD_HIDEFROMPARENT
  9.         call nos.BDOS
  10.         ld e,0x86
  11.         ld c,nos.CMD_SETGFX
  12.         call nos.BDOS
  13.         ld c,nos.CMD_YIELD
  14.         call nos.BDOS
  15.         ld c,nos.CMD_GETMAINPAGES
  16.         call nos.BDOS
  17.         ld (pg4),de
  18.         ld (pgC),hl
  19.         jp cls
  20.        
  21. printZ
  22.         ld a,(hl)
  23.         or a
  24.         ret z
  25.         inc hl
  26.         push hl
  27.         rst 0x10
  28.         pop hl
  29.         jr printZ
  30.        
  31. cls    
  32.         ld e,7
  33.         ld c,nos.CMD_CLS
  34.         jp nos.BDOS
  35.        
  36. putC
  37.         jp 0x0010
  38.        
  39. gotoXY
  40.         push hl
  41.         ld c,nos.CMD_SETXY
  42.         call nos.BDOS
  43.         pop hl
  44.         ret
  45.        
  46. fillLine:
  47.     ld d, h, e, 0 : call gotoXY
  48.     ld b, 80
  49. .loop
  50.     push af, bc
  51.     rst 0x10
  52.     pop bc, af
  53.     djnz .loop
  54.     ret
  55.        
  56. usualLine
  57. highlightLine  
  58.         ld d,a
  59.         ld e,0
  60. .mloop
  61.         push de
  62.         ld c,nos.CMD_SETXY
  63.         call nos.BDOS
  64.         ld c,nos.CMD_GETATTR
  65.         call nos.BDOS
  66.         xor 0xff
  67.         ld e,a
  68.         ld c,nos.CMD_PRATTR
  69.         call nos.BDOS
  70.         pop de
  71.         inc e
  72.         ld a,e
  73.         cp 80
  74.         jr nz,.mloop
  75.         ret
  76.     ENDMODULE
  77.