?login_element?

Subversion Repositories NedoOS

Rev

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

  1.         DEVICE ZXSPECTRUM128
  2.         include "../_sdk/sys_h.asm"
  3.  
  4.         org PROGSTART
  5. begin
  6.         ;ld e,6 ;textmode
  7.         ;OS_SETGFX
  8.         call initstdio
  9.  
  10.         ld a,9
  11.         ld b,0
  12.         ld de,0x8000
  13.         ld ix,0
  14.         ld hl,0
  15. ;b=drive(0..), de=buffer, ixhl=sector number, a=count
  16.         OS_READSECTORS
  17.         jr $
  18.        
  19.         ld hl,thello
  20.         call prtext
  21.         ld hl,thello
  22.         call prtext
  23.         ld hl,thello
  24.         call prtext
  25.         ld hl,thello
  26.         call prtext
  27.        
  28.         QUIT
  29.  
  30. prtext
  31. ;hl=text
  32.         push hl
  33.         call strlen ;hl=length
  34.         pop de ;de=text
  35.         jp sendchars
  36.  
  37. strlen
  38. ;hl=str
  39. ;out: hl=length
  40.         xor a
  41.         ld b,a
  42.         ld c,a ;чтобы точно найти терминатор
  43.         cpir ;найдём обязательно, если длина=0, то bc=-1 и т.д.
  44.         ld hl,-1
  45.         or a
  46.         sbc hl,bc
  47.         ret
  48.  
  49. thello
  50.         ;db "Hello, world!",0x0d,0x0a,0
  51.         db "Sele",0x1b,'[','1','D',"ct drive:\r\n[0] Nemo master\r\n[1] Nemo slave\r\n[2] ATM master(not tested!)\r\n[3] ATM slave(not tested!)",0
  52.        
  53.         include "../_sdk/stdio.asm"
  54. end
  55.         savebin "hello.com",begin,end-begin
  56.  
  57.         LABELSLIST "../../us/user.l"
  58.