Print text.

ZXNet echo conference «code.zx»

From Stanislav Lomakin To All 30 March 2006

Hello, mig'95 mig> Please tell me how to organize printing mig> text on the screen is not RST 16. It is not necessary to provide the code here mig> just a general description of the algorithm is enough.. I myself have something in mig> difficulty.. :v2_conf2: using x,y coordinates, calculate the address of the upper byte of the familiarity location, (*) take the code symbol, using the symbol code and font address, find the address of the first of the 8 bytes of graphics symbol. take a character byte, put it in the screen address, move on to the next one character byte and screen address one pixel lower, and so on 8 times. go to screen address for the next character, repeat all this, starting with (*), until until the line ends.

From Kirill Frolov To All 30 March 2006

Hello, boo_boo Line by line will be faster. Those. first the top line of the entire line, then the second etc.

From Igor Mamonov To All 30 March 2006

Hello, boo_boo boo> using the symbol code and font address, find the address of the first of 8 graphics bytes boo> character. This is completely unclear. Can you be more specific? For example, if I use standard font located at address 15616 (also, by the way, incomprehensible - after all to launch TR-DOS we contact from BASIC to this address, and there is the font) and I need to print a character, for example "H" (code 72).

From Stanislav Yudin To All 30 March 2006

Hello, mig'95 mig> For example, if I use a standard font located from the address mig> 15616 (also, by the way, it’s not clear - after all, to run TR-DOS we mig> we contact from BASIC to this address, and there is a font) and I need mig> print a character, for example "H" (code 72). Each character in ROM takes up 8 bytes. The font begins with a space character. His code - 32. This means the real beginning of the font, that is, the character with code 0, is located at 15616-32*8. To get the address of the letter "H" in a font you obviously need do this: (15616-32*8)+(72*8). The 8 bytes following this address will be components of the H symbol. As for TR-DOS, the Beta Disk controller is designed in such a way that when you try transition to a certain area of ROM addresses, which includes the mentioned address is 15616, the TR-DOS ROM is turned on, which replaces standard ROM with BASIC. And in the TR-DOS ROM at these addresses there are no longer font, and the program code for working with the drive.

From Wladimir Bulchukey To All 30 March 2006

Hello, CityAceE The general principle is this: Physical address of video memory: Address=16384+2048*I+32*J+256*K+X, where: I=0...2 - number of the third of the screen (from top to bottom); J=0...7 - number of the character line in the third (from top to bottom); K=0...7 - line number (byte) in the symbol (from top to bottom); X=0...31 - number of the familiar place in the line (from left to right).