Available on:

DEFDGR

This command allows you to customize a single character from those used in graphical mode. The character is defined by means of an 8 pixel by 8 pixel monochrome matrix. The char parameter must be intended as the "screen code" of the character to replace. The screen code is the character representation mechanism of the target chipset, and is different from the ASCII system. Each video chipset can have its own specific set of screen codes and, therefore, it is necessary to retrieve the corresponding character code to be redefined.

If the system font has fewer pixels along one or both directions, the character will be aligned to the top left and the extra pixels will be ignored. The customization of the character occurs at runtime.

If you want to customize the characters used in text mode, or during compilation, you must use the LOAD FONT command.

SYNTAX

 DEFDGR[$](char) = b0, b1, ... , b7


Legend
  • id : identifier
  • type : datatype
  • v : value
  • "..." : string
  • [...] : optional

EXAMPLE

 DEFDGR(0) = $ff, $ff, $ff, $ff, $00, $00, $00, $00
 DEFDGR$(1) = $ff, $ff, $ff, $ff, $00, $00, $00, $00


Used in:

ABBREVIATION: Dfg

Join BASIC 10Liner Contest with ugBASIC!

An interesting competition is held at the beginning of each year: the BASIC 10Liner Contest. It is possible to use ugBASIC to participate in the next "BASIC10Liner" competition, in the following categories:

  • PUR-120 - A game in 10 lines of max 120 characters (w/abbrev.)
  • EXTREME-256 - A game in 10 lines of max 256 characters (w/abbrev.)
  • SCHAU - Any program in 10 lines of max 256 characters (w/abbrev.)
In order to reduce space you can use this abbreviation for this instruction:

DEFDGR ↔ Dfg

Any problem?

If you have found a problem with this keyword, if you think there is a bug or, more simply, you would like it to be improved, open an issue for this example on GitHub.
Thank you!

open an issue BACK TO KEYWORDS