Bold text on the Z88

Discussion about other targets
Post Reply
Jbizzel
Member
Posts: 14
Joined: Tue Jun 29, 2021 7:20 pm

Bold text on the Z88

Post 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?
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Re: Bold text on the Z88

Post 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
Jbizzel
Member
Posts: 14
Joined: Tue Jun 29, 2021 7:20 pm

Re: Bold text on the Z88

Post by Jbizzel »

Thanks @dom,

I did try <conio.h> that explains why it didn't work.
Jbizzel
Member
Posts: 14
Joined: Tue Jun 29, 2021 7:20 pm

Re: Bold text on the Z88

Post 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
Post Reply