?login_element?

Subversion Repositories NedoOS

Rev

Rev 1410 | Rev 1667 | 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 hl,thello
  11.         call prtext
  12.         ld hl,thello
  13.         call prtext
  14.         ld hl,thello
  15.         call prtext
  16.         ld hl,thello
  17.         call prtext
  18.        
  19.         QUIT
  20.  
  21. prtext
  22. ;hl=text
  23.         push hl
  24.         call strlen ;hl=length
  25.         pop de ;de=text
  26.         jp sendchars
  27.  
  28. strlen
  29. ;hl=str
  30. ;out: hl=length
  31.         xor a
  32.         ld b,a
  33.         ld c,a ;чтобы точно найти терминатор
  34.         cpir ;найдём обязательно, если длина=0, то bc=-1 и т.д.
  35.         ld hl,-1
  36.         or a
  37.         sbc hl,bc
  38.         ret
  39.  
  40. thello
  41.         ;db "Hello, world!",0x0d,0x0a,0
  42.         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
  43.        
  44.         include "../_sdk/stdio.asm"
  45. end
  46.         savebin "hello.com",begin,end-begin
  47.  
  48.         LABELSLIST "../../us/user.l",1
  49.