"printf()" Cursor Repositioning
Posted: Sun Jul 15, 2018 6:19 pm
Hello my fellow Z88dk'ers,
I promise this will be the last time I bug the boards today - so I will be brief as I can.
I want to use the printf() command in 64 column mode
I have achieved this quite simply.
I want to add PAPER and INK to the text I want to print
I have achieved this also
However getting the Print Cursor to move is simply not working as expected I suspect that I have gotten the wrong end of the stick here.
so lets look
The above works as expected, however
does exactly the same as the above, it is as though the "_AT" (\x08 22) is not processed...
I am pretty sure I have had this working in the past, I just favoured a faster (much lesser ability) ASM print routine using the ROM call ( fixed 32 column mode), however it does indeed work with the above Print Codes.
So I have had a play for an hour - sadly I cannot fathom what I have done wrong - any ideas would be welcome.
I promise this will be the last time I bug the boards today - so I will be brief as I can.
I want to use the printf() command in 64 column mode
I have achieved this quite simply.
I want to add PAPER and INK to the text I want to print
I have achieved this also
However getting the Print Cursor to move is simply not working as expected I suspect that I have gotten the wrong end of the stick here.
so lets look
Code: Select all
/*
_BRIGHT = 19
_INK = 16
_PAPER = 17
_ON = 1
_OFF = 0
*/
printf("\x08%c%c%c%c%c%cTest", _BRIGHT, _ON, _INK, RED, _PAPER, YELLOW);
Code: Select all
/*
_AT = 22
_BRIGHT = 19
_INK = 16
_PAPER = 17
_ON = 1
_OFF = 0
*/
printf("\x08%c%c%c%c%c%c%c%c%cTest", _AT, row, col, _BRIGHT, _ON, _INK, RED, _PAPER, YELLOW);
I am pretty sure I have had this working in the past, I just favoured a faster (much lesser ability) ASM print routine using the ROM call ( fixed 32 column mode), however it does indeed work with the above Print Codes.
So I have had a play for an hour - sadly I cannot fathom what I have done wrong - any ideas would be welcome.