?login_element?

Subversion Repositories NedoOS

Rev

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

  1. prwindow_edit
  2. ;hl=window DE=texteditaddr c=texteditsize
  3. ;out: CY=OK, de=filename
  4.         push de
  5.         push bc
  6.         call prwindow_text ;de=YX of last line
  7.         pop bc
  8.         pop hl
  9.         push hl
  10. ;        ld hl,de ;hl=textaddr
  11.         ld a,c ;a=maxsz
  12.         call editline
  13.         pop de ;de=filename
  14.         cp key_esc
  15.         ret z ;cancel
  16.         scf
  17.         ret
  18.  
  19.  
  20. prwindow_waitkey
  21. ;hl=window
  22. ;out: CY=OK
  23. ;        ld (prwindow_waitkey_addr),hl; commented by demige 190511
  24.         call prwindow_text; insert by demige 190511
  25. ; comment by demige 190511: for why reprinting window after each keypress? On second print getmarkedfiles returns wrong value.
  26. prwindow_waitkey0
  27. ;prwindow_waitkey_addr=$+1 ; comment by demige 190511
  28. ;        ld hl,0 ; comment by demige 190511
  29. ;        call prwindow_text ; comment by demige 190511
  30.         call yieldgetkeyloop ;YIELDGETKEYLOOP
  31.         ld a,c
  32.         cp key_esc
  33.         ret z
  34.         cp 'n'
  35.         ret z
  36.         ;cp 'N'
  37.         ;ret z
  38.         cp key_redraw
  39.         ret z
  40.         cp 'y'
  41.         jr z, prwindow_waitkey_keyyes
  42.         ;cp 'Y'
  43.         ;jr z, prwindow_waitkey_keyyes
  44.         cp key_enter
  45.         jr nz,prwindow_waitkey0
  46. prwindow_waitkey_keyyes
  47.         scf
  48.         ret
  49.  
  50.  
  51. upwindow_text
  52.         ld a,0
  53.         jr prwindow_text0
  54.  
  55. prwindow_text
  56.         ld a,1
  57. prwindow_text0
  58. ;hl = window text
  59. ;out: ;de=YX of last line
  60.         ld e,(hl) ;x
  61.         inc hl
  62.         ld d,(hl) ;y
  63.         inc hl
  64.         ld c,(hl) ;wid
  65.         inc hl
  66.         ld b,(hl) ;hgt
  67.         inc hl
  68.  
  69.         push hl ;text
  70.  
  71.         push de
  72.         or a
  73.         call nz,prwin
  74.         pop de
  75.         inc d
  76.         inc e
  77.         inc e
  78.         call nv_setxy ;keeps de,hl
  79.        
  80.         pop hl ;text
  81. prwindow_waitkey_text0
  82.         ld a,(hl)
  83.         or a
  84.         ret z
  85.         dec a;cp 1
  86.         jr z,prwindow_waitkey_textnfiles
  87.         dec a;cp 2
  88.         jr z,prwindow_waitkey_textoutertext
  89.         dec a;cp 3
  90.         jr z,prwindow_waitkey_textnextline
  91.         push de
  92.          ld c,0
  93.         call prtext
  94.         pop de
  95.         jr prwindow_waitkey_text0
  96. prwindow_waitkey_textnfiles
  97.         inc hl
  98.         push de
  99.         push hl
  100.         call getmarkedfiles;countmarkedfiles
  101.         call prdword
  102.         pop hl
  103.         pop de
  104.         jr prwindow_waitkey_text0
  105. prwindow_waitkey_textoutertext
  106.         inc hl
  107.         push de
  108.         ld e,(hl)
  109.         inc hl
  110.         ld d,(hl)
  111.         inc hl
  112.         push hl
  113.         ex de,hl
  114.          ld c,0
  115.         call prtext
  116.         pop hl
  117.         pop de
  118.         jr prwindow_waitkey_text0
  119. prwindow_waitkey_textnextline
  120.         inc hl
  121.         inc d
  122.         call nv_setxy ;keeps de,hl
  123.         jr prwindow_waitkey_text0
  124.  
  125. getmarkedfiles
  126. ;ix = panel
  127. ;out: hl'hl = files
  128.         ld hl,0
  129.         exx
  130.         ld l,(ix+PANEL.markedfiles)
  131.         ld h,(ix+PANEL.markedfiles+1)
  132.         ret
  133.  
  134. changemark_hl
  135.         ;jr $
  136.         push hl
  137.         ld a,(hl)
  138.         xor 1
  139.         ld (hl),a
  140.         ld bc,FCB_FSIZE
  141.         add hl,bc
  142.         ld e,(hl)
  143.         inc hl
  144.         ld d,(hl)
  145.         inc hl
  146.         ld c,(hl)
  147.         inc hl
  148.         ld b,(hl)
  149. ;bcde = file size
  150.         ld l,(ix+PANEL.markedfiles)
  151.         ld h,(ix+PANEL.markedfiles+1)
  152.         inc hl
  153.         jr nz,changemark_hlq ;set mark
  154. ;remove mark
  155.         dec hl
  156.         dec hl
  157.         xor a
  158.         sub e
  159.         ld e,a
  160.         ld a,0
  161.         sbc a,d
  162.         ld d,a
  163.         ld a,0
  164.         sbc a,c
  165.         ld c,a
  166.         sbc a,b
  167.         sub c
  168.         ld b,a ;bcde= -bcde
  169. changemark_hlq
  170.         ld a,(ix+PANEL.markedsize)
  171.         add a,e
  172.         ld (ix+PANEL.markedsize),a
  173.         ld a,(ix+PANEL.markedsize+1)
  174.         adc a,d
  175.         ld (ix+PANEL.markedsize+1),a
  176.         ld a,(ix+PANEL.markedsize+2)
  177.         adc a,c
  178.         ld (ix+PANEL.markedsize+2),a
  179.         ld a,(ix+PANEL.markedsize+3)
  180.         adc a,b
  181.         ld (ix+PANEL.markedsize+3),a
  182.         ld (ix+PANEL.markedfiles),l
  183.         ld (ix+PANEL.markedfiles+1),h
  184.         pop hl
  185.         ret
  186.  
  187. getmarkedfilessize
  188. ;ix = panel
  189. ;out: hl'hl = files
  190.         ld l,(ix+PANEL.markedsize+2)
  191.         ld h,(ix+PANEL.markedsize+3)
  192.         exx
  193.         ld l,(ix+PANEL.markedsize)
  194.         ld h,(ix+PANEL.markedsize+1)
  195.         ret
  196.        
  197. getfiles
  198. ;ix = panel
  199. ;out: hl'hl=files (without ".", "..")
  200.         ld hl,0
  201.         exx
  202.         ld l,(ix+PANEL.filesdirs)
  203.         ld h,(ix+PANEL.filesdirs+1)
  204.         ret
  205.  
  206. countfiles
  207.         ld hl,proc_count
  208.         jp processfiles ;hl'hl=files (without ".", "..")
  209. proc_count
  210.         inc iy
  211.         ret
  212.  
  213. getfilessize
  214. ;ix = panel
  215.         ;exx
  216.         ld l,(ix+PANEL.totalsize+2)
  217.         ld h,(ix+PANEL.totalsize+3)
  218.         exx
  219.         ld l,(ix+PANEL.totalsize)
  220.         ld h,(ix+PANEL.totalsize+1)
  221.         ret ;hl'hl=size
  222.  
  223. processfiles
  224. ;ix = panel address (kept)
  225. ;hl = procedure address (uses hl=fcb, hl'iy = accumulator)
  226. ;out: hl'hl = result
  227.         ld (processfiles_proc),hl
  228.         ;ld a,(ix+PANEL.pg)
  229.         ;SETPG32KHIGH
  230.  
  231.         call nv_getpanelfiles_bc
  232.  
  233.         ld l,(ix+PANEL.pointers)
  234.         ld h,(ix+PANEL.pointers+1)
  235.         exx
  236.         ld hl,0
  237.         exx
  238.         ld iy,0
  239. processfiles0
  240.         ld a,b
  241.         or c
  242.         jr z,processfilesq
  243.         push bc
  244.         call getfilepointer_de_fromhl
  245.         push hl
  246.         push ix
  247.         ex de,hl
  248.         call isthisdotdir_hl
  249. processfiles_proc=$+1
  250.         call nz,0 ;copy может переключать страницу (сейчас не переключает)
  251.         pop ix
  252.         pop hl
  253.         pop bc
  254.         dec bc
  255.         jp processfiles0
  256. processfilesq
  257.         push iy
  258.         call nv_batch
  259.         pop hl
  260.         ret
  261.  
  262. gotofilepointer_numberde
  263.         ld l,(ix+PANEL.pointers)
  264.         ld h,(ix+PANEL.pointers+1)
  265.         add hl,de
  266.         add hl,de
  267.         ret
  268.  
  269. getfilepointer_de_fromhl
  270. ;out: hl=next pointer
  271.         ld a,(ix+PANEL.poipg)
  272.         SETPG32KHIGH
  273.         ld e,(hl)
  274.         inc hl
  275.         ld d,(hl)
  276.         inc hl
  277.          ;push bc
  278.         ;ld a,(ix+PANEL.pg) ;TODO from de
  279.         ;SETPG32KHIGH
  280.         ld a,e
  281.         and 31
  282.         add a,(ix+PANEL.pgadd)
  283.         PGW3strpg
  284.         push af
  285.         ld a,e
  286.         and 0xe0
  287.         ld e,a
  288.         pop af
  289.          ;pop bc
  290.         ret
  291.  
  292. putfilepointer_de_tohl
  293. ;out: hl=next pointer
  294.          ;push bc
  295.         ld a,(ix+PANEL.poipg)
  296.         SETPG32KHIGH
  297.          ;pop bc
  298.         ld (hl),e      
  299.         inc hl
  300.         ld (hl),d
  301.         inc hl
  302.         ret
  303.  
  304. swapfilepointers_hl_de
  305. ;out: hl=next pointer
  306.         ld a,(ix+PANEL.poipg)
  307.         SETPG32KHIGH
  308.         ld a,(de)
  309.         ldi
  310.         dec hl
  311.         ld (hl),a
  312.         inc hl
  313.         ld a,(de)
  314.         ldi
  315.         dec hl
  316.         ld (hl),a
  317.         inc hl
  318.         ret
  319.  
  320. isthisdotdir_hl
  321. ;out: z="." or ".."
  322.         inc hl
  323.         ld a,(hl)
  324.         cp '.'
  325.         dec hl
  326.         ret
  327.  
  328.  
  329. drawpanelfilesandsize
  330. ;ix=panel
  331.         call nv_getpanelxy_de
  332.         ld a,d
  333.         add a,22
  334.         ld d,a
  335.         inc e
  336.         inc e
  337.         call nv_setxy
  338.         ld de,_PANELFILECOLOR
  339.         call nv_setcolor
  340.         call getmarkedfiles
  341.         ld a,h
  342.         or l
  343.         push af ;z = no marked
  344.         call z,getfiles
  345.         pop af
  346.         ld de,_PANELSELECTCOLOR
  347.         call nz,nv_setcolor
  348.         push af
  349.         push ix
  350.         call prdword
  351.         ld hl,wordfiles
  352.          ld c,0
  353.         call prtext
  354.         pop ix
  355.         pop af ;z = no marked
  356.         jr nz,drawpanelfilesandsize_markedsize
  357.         call getfilessize
  358.         jr drawpanelfilesandsize_markedsizeq
  359. drawpanelfilesandsize_markedsize
  360.         call getmarkedfilessize
  361. drawpanelfilesandsize_markedsizeq
  362.         push ix
  363.         call prdword
  364.         ld hl,wordbytes
  365.          ld c,0
  366.         call prtext
  367.         pop ix
  368.         ret
  369.  
  370. nv_setxy
  371. ;de=yx (kept)
  372. ;keeps hl
  373.         push de
  374.         push hl
  375.         push ix
  376.         SETXY_
  377.         pop ix
  378.         pop hl
  379.         pop de
  380.         ret
  381.        
  382. setpanelcolor
  383.         ld de,_PANELCOLOR
  384. nv_setcolor
  385. ;d=paper, e=ink
  386.         push hl
  387.         push ix
  388.         SETCOLOR_
  389.         pop ix
  390.         pop hl
  391.         ret
  392.        
  393. getfcbaddrundercursor
  394.         call nv_getdirpos_hl
  395. getfcbaddrunderhl
  396.         ld ix,(curpanel)
  397.         ;ld a,(ix+PANEL.pg)
  398.         ;SETPG32KHIGH
  399.         ex de,hl
  400.         ;ld l,(ix+PANEL.pointers)
  401.         ;ld h,(ix+PANEL.pointers+1)
  402.         ;add hl,de
  403.         ;add hl,de
  404.         call gotofilepointer_numberde
  405.         ;ld a,(hl)
  406.         ;inc hl
  407.         ;ld h,(hl)
  408.         ;ld l,a ;hl=FCB
  409.         call getfilepointer_de_fromhl
  410.         ex de,hl ;hl=FCB
  411.         ret
  412.        
  413. getfcbundercursor
  414.         call getfcbaddrundercursor
  415. getfcbfromhl
  416.         ld de,fcb
  417.         ld bc,FCB_sz
  418.         ldir
  419.         ret
  420.        
  421. panelprtext
  422. ;print max 37 chars (dir)
  423. ;hl = text
  424. ;keeps ix
  425.         push ix
  426. panelprtext0
  427.         ld a,(hl)
  428.         or a
  429.         jr z,panelprtextq
  430.         push bc
  431.         push hl
  432.         PRCHAR_
  433.         pop hl
  434.         pop bc
  435.         inc c
  436.         inc hl
  437.         ld a,c
  438.         cp 37
  439.         jp nz,panelprtext0
  440. panelprtextq
  441.         pop ix
  442.         ret
  443.  
  444. changedir_fromfcb
  445.         call setcurpaneldir
  446.         ld hl,fcb_filename
  447.         ld de,filenametext
  448.         push de
  449.         call cpmname_to_dotname
  450.         pop de
  451.         OS_CHDIR
  452.         ret
  453.      
  454. readfile_pages_dehl
  455.         ld a,d
  456.         SETPG32KHIGH
  457.         ld a,+(0xc000+PROGSTART)/256
  458.         call cmd_loadpage
  459.         or a
  460.         ret nz
  461.        
  462.         ld a,e
  463.         SETPG32KHIGH
  464.         ld a,0xc000/256
  465.         call cmd_loadpage
  466.         or a
  467.         ret nz
  468.        
  469.         ld a,h
  470.         SETPG32KHIGH
  471.         ld a,0xc000/256
  472.         call cmd_loadpage
  473.         or a
  474.         ret nz
  475.        
  476.         ld a,l
  477.         SETPG32KHIGH
  478.         ld a,0xc000/256
  479.         jp cmd_loadpage
  480.  
  481. cmd_savepage
  482. ;hl=size
  483. ;out: a=error
  484.         push hl
  485.         ld de,0x8000
  486.         OS_SETDTA
  487.         pop hl
  488.         ld de,fcb2
  489.         OS_FWRITE_NBYTES
  490.         ret
  491.        
  492. prwin
  493. ;de=yx
  494. ;bc=hgt,wid
  495.         ld a,c
  496.         sub 2
  497.         ld (winbeginstroka_wid),a
  498.         ld (winmidstroka_wid),a
  499.         ld (winendstroka_wid),a
  500.         ld hl,winbeginstroka
  501.         call prtableline
  502.         dec b
  503.         dec b
  504. winlineN_0     
  505.         inc d
  506.         ld hl,winmidstroka
  507.         call prtableline
  508.         djnz winlineN_0        
  509.         inc d
  510.         ld hl,winendstroka
  511.         jr prtableline
  512.        
  513. prtable
  514. ;de=yx
  515.         ld hl,prbeginstroka
  516.         call prtableline
  517.         ld b,CONST_HGT_TABLE   
  518. prtable0       
  519.         inc d
  520.         ld hl,prmidstroka
  521.         call prtableline
  522.         djnz prtable0
  523.         inc d
  524.         ld hl,prendstroka
  525. prtableline
  526. ;hl=tableline data
  527. ;de=yx
  528. ;b=hgt
  529. ;keeps bc,de,ix
  530.         push bc
  531.         call nv_setxy ;keeps de,hl
  532. prtableline0   
  533.         ld a,(hl)
  534.         or a
  535.         jr z,prtablelineq
  536.         inc hl
  537.         ld b,(hl)
  538.         inc hl
  539.         call prNsymbol
  540.         jr prtableline0
  541. prtablelineq
  542.         pop bc
  543.         ret
  544.  
  545. prNsymbol
  546. ;a=symbol
  547. ;b=count
  548.         push de
  549.         push hl
  550.         push ix
  551.         ld c,a
  552. prNsymbol0
  553.         push bc
  554.         ld a,c
  555.         PRCHAR_
  556.         pop bc
  557.         djnz prNsymbol0
  558.         pop ix
  559.         pop hl
  560.         pop de
  561.         ret
  562.  
  563. ;;;;;;;;;;;;;;;;;;
  564.        
  565. cmdprchar
  566.         push hl
  567.         push ix
  568.         PRCHAR_
  569.         pop ix
  570.         pop hl
  571.         ret
  572.  
  573. nv_getpanelxy_de
  574.         ld e,(ix+PANEL.xy)
  575.         ld d,(ix+PANEL.xy+1)
  576.         ret
  577.  
  578. nv_getdirscroll_bc
  579.         ld c,(ix+PANEL.dirscroll)
  580.         ld b,(ix+PANEL.dirscroll+1)
  581.         ret
  582. nv_setdirscroll_bc
  583.         ld (ix+PANEL.dirscroll),c
  584.         ld (ix+PANEL.dirscroll+1),b
  585.         ret
  586.  
  587. nv_getpanelfiles_bc
  588.         ld c,(ix+PANEL.files)
  589.         ld b,(ix+PANEL.files+1)
  590.         ret
  591. nv_getdirpos_hl
  592.         ld l,(ix+PANEL.dirpos)
  593.         ld h,(ix+PANEL.dirpos+1)
  594.         ret
  595.  
  596. cpfiles_setdirpos
  597. ;hl=suggested dirpos (might be >= files)
  598. ;out: hl=dirpos
  599.         call nv_getpanelfiles_bc
  600.         dec bc
  601.         call minhl_bc_tobc
  602.         ld h,b
  603.         ld l,c
  604. nv_setdirpos_hl
  605.         ld (ix+PANEL.dirpos),l
  606.         ld (ix+PANEL.dirpos+1),h
  607.         ret
  608. nv_setdirpos_zero
  609.         ld hl,0
  610.         jr nv_setdirpos_hl
  611.  
  612. count_filecursor_y
  613. ;out: a=y, de=PANEL.xy
  614.         call nv_getpanelxy_de
  615.         ld a,(ix+PANEL.dirpos)
  616.         sub (ix+PANEL.dirscroll)
  617.         add a,d;(ix+PANEL.xy+1) ;y
  618.         ret
  619.  
  620. setfilecursorxy
  621.         ;push af
  622.         ld ix,(curpanel)
  623.         call count_filecursor_y
  624.         ld d,a
  625.         ;ld e,(ix+PANEL.xy)
  626.         inc d
  627.         inc e
  628.         ;pop af
  629.         ;push af
  630.         call nv_setxy
  631.         ;pop af ;color
  632.         ret
  633.  
  634. prfilecursor
  635. ;hl=color
  636.         push hl
  637.         call setfilecursorxy
  638.         pop hl
  639.         ld b,12
  640.         call drawfilecursor_sizeb_colorhl ;hl=old color
  641.         ld ix,(curpanel)
  642.         ret
  643.  
  644. editcmd_readprompt_setendcmdx
  645.         ld ix,(curpanel)
  646.         call setpaneldir_makeprompt ;->prompt
  647.         ld hl,cmdbuf
  648.         call strlen
  649.         ld a,l
  650.         ld (curcmdx),a
  651.         ret
  652.  
  653. getanotherpanel_ix
  654. curpanel=$+1
  655.         ld bc,leftpanel
  656.         ld hl,0xffff&(leftpanel+rightpanel)
  657.         or a
  658.         sbc hl,bc
  659.         push hl
  660.         pop ix
  661.         ret
  662.        
  663. setanotherpaneldir
  664.         call getanotherpanel_ix
  665.         jr setpaneldir
  666.  
  667. setcurpaneldir
  668.         ld ix,(curpanel)
  669. setpaneldir
  670. ;ix=panel
  671.         push ix
  672.         pop hl
  673.         ld de,PANEL.dir
  674.         add hl,de
  675.         ex de,hl ;de=path
  676.         OS_CHDIR
  677.         ret
  678.        
  679. drawfilecursor_sizeb_colorhl
  680. ;de=yx
  681. ;hl=color
  682. ;b=size
  683. ;out: hl=oldcolor
  684.         ld (drawfilecursor_color),hl
  685.         push bc
  686.         ;push de
  687.         push de
  688.         call nv_setxy
  689.         pop de
  690.         ;OS_SETXY
  691.         ;OS_GETATTR
  692.         ;pop de
  693.         pop bc
  694.          ;jr $
  695.          ;push af ;oldcolor
  696.         push bc
  697. drawfilecursor_color=$+1
  698.         ld de,_FILECURSORCOLOR
  699.         SETCOLOR_
  700.         call setcolor_invisible
  701.         pop bc
  702.         ld de,tspaces
  703.         ld h,0
  704.         ld l,b
  705.         call sendchars
  706.        
  707. ;drawfilecursor0
  708. ;       push bc
  709. ;       push de
  710. ;       call nv_setxy
  711. ;drawfilecursor_color=$+1
  712. ;       ld de,_FILECURSORCOLOR
  713. ;       OS_PRATTR
  714. ;       pop de
  715. ;       pop bc
  716. ;       inc e
  717. ;       djnz drawfilecursor0
  718.  
  719.         call setcolor_visible
  720.          ;pop af ;oldcolor
  721.          ;and 7
  722.          ;ld l,a
  723.          ;ld h,4 ;blue
  724.         ret
  725.  
  726. nv_openfcb
  727. ;if success, autopush nv_closefcb
  728. ;out: nz=error
  729.         push ix
  730.         ld de,fcb
  731.         OS_FOPEN
  732.         pop ix
  733.         or a
  734.         ret nz ;error
  735.         ld hl,nv_closefcb
  736.         ex (sp),hl
  737.         jp (hl)
  738.  
  739. nv_createfcb2
  740. ;if success, autopush nv_closefcb2
  741. ;out: nz=error
  742.         ld de,fcb2
  743.         push ix
  744.         OS_FCREATE
  745.         pop ix
  746.         or a
  747.         ret nz ;error
  748.         ld hl,nv_closefcb2
  749.         ex (sp),hl
  750.         jp (hl)
  751.  
  752. nv_closefcb2
  753. ;keep de!!!
  754.         push de
  755.         ld de,fcb2
  756.         jr nv_closefcb_de_
  757. nv_closefcb
  758. ;keep de!!!
  759.         push de
  760.         ld de,fcb
  761. nv_closefcb_de_
  762. ;out: keep flags!!!
  763.         push af
  764.         push ix
  765.         OS_FCLOSE
  766.         pop ix
  767.         pop af
  768.         pop de
  769.         ;or a
  770.         ret
  771.  
  772. copy_to_fcb_filename
  773.         ld de,fcb_filename
  774. copy_to_defcb_filename
  775.         ld bc,11
  776.         ldir
  777.         ret
  778.  
  779. winbeginstroka
  780.         db 0xc9;'г'
  781.         db 1
  782.         db 0xcd;'='
  783. winbeginstroka_wid=$
  784.         db 12;wdtcolumn1
  785.         db 0xbb;'┐'
  786.         db 1
  787.         db 0
  788.        
  789. winmidstroka
  790.         db 0xba;'│'
  791.         db 1
  792.         db ' '
  793. winmidstroka_wid=$
  794.         db 12;wdtcolumn1
  795.         db 0xba;'│'
  796.         db 1   
  797.         db 0
  798.  
  799. winendstroka
  800.         db 0xc8;'L'
  801.         db 1
  802.         db 0xcd;'='
  803. winendstroka_wid=$
  804.         db 12;wdtcolumn1
  805.         db 0xbc;'-'
  806.         db 1   
  807.         db 0
  808.  
  809. prbeginstroka
  810.         db 0xc9;'г'
  811.         db 1
  812.         db 0xcd;'='
  813.         db 12;wdtcolumn1
  814.         db 0xd1;'T'
  815.         db 1
  816.         db 0xcd;'='
  817.         db 10;wdtcolumn2
  818.         db 0xd1;'T'
  819.         db 1
  820.         db 0xcd;'='
  821.         db 14;wdtcolumn3
  822.         db 0xbb;'┐'
  823.         db 1
  824.         db 0
  825.  
  826. prmidstroka
  827.         db 0xba;'│'
  828.         db 1
  829.         db ' '
  830.         db 12;wdtcolumn1
  831.         db 0xb3;'│'
  832.         db 1
  833.         db ' '
  834.         db 10;wdtcolumn2
  835.         db 0xb3;'│'
  836.         db 1
  837.         db ' '
  838.         db 14;wdtcolumn3
  839.         db 0xba;'│'
  840.         db 1   
  841.         db 0
  842.  
  843. prendstroka
  844.         db 0xc8;'L'
  845.         db 1
  846.         db 0xcd;;'='
  847.         db 12;wdtcolumn1
  848.         db 0xcf;'│'
  849.         db 1
  850.         db 0xcd;'='
  851.         db 10;wdtcolumn2
  852.         db 0xcf;'│'
  853.         db 1
  854.         db 0xcd;'='
  855.         db 14;wdtcolumn3
  856.         db 0xbc;'-'
  857.         db 1   
  858.         db 0
  859.  
  860. nv_copyscreen0to1
  861.         OS_GETMAINPAGES
  862.         push hl
  863.         ;OS_GETSCREENPAGES
  864.         ld a,(user_scr1_low) ;ok
  865.         ld l,a
  866.         ld a,(user_scr1_high) ;ok
  867.         ld h,a
  868.         ld a,(user_scr0_low) ;ok
  869.         ld e,a
  870.         ld a,(user_scr0_high) ;ok
  871.         ld d,a
  872.         push hl ;1 screen
  873.         push de ;0 screen
  874.         ld a,l
  875.         SETPG32KHIGH
  876.         pop de
  877.         push de
  878.         ld a,e
  879.         SETPG32KLOW
  880.         ld bc,0x4000
  881.         ld hl,0x8000
  882.         ld de,0xC000
  883.         ldir
  884.         pop de
  885.         pop hl
  886.         push de
  887.         ld a,h
  888.         SETPG32KHIGH
  889.         pop de
  890.         ld a,d
  891.         SETPG32KLOW
  892.         ld bc,0x4000
  893.         ld hl,0x8000
  894.         ld de,0xC000
  895.         ldir
  896.         pop hl
  897.         push hl
  898.         ld a,l
  899.         SETPG32KHIGH
  900.         pop hl
  901.         ld a,h
  902.         SETPG32KLOW
  903.         ret
  904.  
  905. nv_copyscreen1to0
  906.         OS_GETMAINPAGES
  907.         push hl
  908.         ;OS_GETSCREENPAGES
  909.         ld a,(user_scr1_low) ;ok
  910.         ld l,a
  911.         ld a,(user_scr1_high) ;ok
  912.         ld h,a
  913.         ld a,(user_scr0_low) ;ok
  914.         ld e,a
  915.         ld a,(user_scr0_high) ;ok
  916.         ld d,a
  917.         push hl ;1 screen
  918.         push de ;0 screen
  919.         ld a,l
  920.         SETPG32KHIGH
  921.         pop de
  922.         push de
  923.         ld a,e
  924.         SETPG32KLOW
  925.         ld bc,0x4000
  926.         ld hl,0xc000
  927.         ld de,0x8000
  928.         ldir
  929.         pop de
  930.         pop hl
  931.         push de
  932.         ld a,h
  933.         SETPG32KHIGH
  934.         pop de
  935.         ld a,d
  936.         SETPG32KLOW
  937.         ld bc,0x4000
  938.         ld hl,0xc000
  939.         ld de,0x8000
  940.         ldir
  941.         pop hl
  942.         push hl
  943.         ld a,l
  944.         SETPG32KHIGH
  945.         pop hl
  946.         ld a,h
  947.         SETPG32KLOW
  948.         ret
  949.