?login_element?

Subversion Repositories NedoOS

Rev

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