Page 1 of 1

Bold text on the Z88

Posted: Tue Jun 29, 2021 8:17 pm
by Jbizzel
Hello!

I hope its ok to ask very basic questions as I'm trying to learn C (knowing only a little basic...) for the Cambridge Z88

So I'm making a little Boggle dice game - so far I've made a random boggle board that displays it on screen.

I'd like to make some of the text bold - I think I need to use an escape code, but in a practical sense I can't figure out how to do this.

So here an example - how could I change this code so that text is bold?

Code: Select all

clrscr();
printf("              Boggle - or Zoggle??  \n \n");
Also, in BBC Basic for the Z88 you can produce an alarm sound with:

Code: Select all

VDU 1,52,33,40,33,33
Can these VDU codes be reproduced in z88DK?

Re: Bold text on the Z88

Posted: Wed Jun 30, 2021 8:10 pm
by dom
Normally at this point I'd just recommend using the gencon and <conio.h>. However I've not implemented it for the z88.

You should be able to output all VDU codes directly though so you'll get the grey, minicaps etc

Re: Bold text on the Z88

Posted: Thu Aug 26, 2021 5:01 pm
by Jbizzel
Thanks @dom,

I did try <conio.h> that explains why it didn't work.

Re: Bold text on the Z88

Posted: Sun Aug 29, 2021 1:00 pm
by Jbizzel
Wait, I found the example and got it to work! :)

I'd been compiling the example file wrong!

I needed to use...

Code: Select all

+z88 -clib=ansi
When I compiled. Then I can ...

Code: Select all

printf("%c[1m                     bold text here. \n", 27);
printf("%c[2m  no longer bold here.\n",27);
Thanks @dom for the examples. I used the compile method found in the make file, and realised my error.

Thanks,


Jamie