input string.

ZXNet echo conference «code.zx»

From Yaroslav Kozlov To Kirill Frolov 23 April 1998

Kirill Frolov at 21-04-98 => Igor Krauklis .... [...] Hello, Kirill & Igor! IK>> People, does anyone have one IK>> line input routine ? KF> “Someone” may have it. Where should I enter it and where should I enter it? KF> From the keyboard like input in BASIC? If for viewer, then... LD B,42; characters in a string LD HL,lab2 PUSH HL LD HL,adr_str;current address lines LD DE,string ;string that will be lab1 LD A,(HL) ;printed INC HL CP#D RET Z ;you can ask here ;for the presence of control ;characters LD(DE),A INC DE DJNZ lab1 CP#D RET NZ INC HL; in HL address next. lines. RET lab2 ..... ;now you can print. If you want Spec to work at full capacity recoil, you can take care of speed. INC RR, 2 bars longer than INC R, and INC RR does not affect flags. This way you can take advantage. Many system programs measures forget that the Z80 has a stack. Its use in reading data gives acceleration by 2 or even more times. Moreover, a waste of memory with reasonable use is insignificant. Of course when the stack is used for such purposes,interruptions must be disabled! And one more thing: on scorpion magic in such places should not be pressed. ..... ; in HL screen address LD (savesp+1),SP LD C,H LD B,32; print 2 characters EXX D.I. LD SP,strind LD B,#F0; mask EXX P64_0 EXX POP DE LD H,#60 LD L,D LD D,H LD A,(DE) INC D AND B LD C,A LD A,(HL) INC H AND #F OR C EXX LD(HL),A INC H .... .... LD H,C INC L DJNZ p64_0 savesp LD SP,0 ; here's the stack EI RET ; here we are back.. This was a fragment of the line printing procedure for 64 characters. [...] Best wishes, PHOENIX -+- ZXASM 3.0