83Plus:BCALLs:4786

From WikiTI
Revision as of 11:07, 3 October 2009 by Dr. D'nar (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Synopsis

Official Name: SFont_Len

BCALL Address: 4786

Returns the width of a small font character.

Inputs

  • HL: Index into font data table. Multiply the character's code by eight to get this.

Outputs

  • B: Font width.
  • A: The SDK is wrong. A only contains the width if a localize or font hook is active and wants to intercept the call.

Destroys

  • AF, BC, DE, HL

Example

Get the width of the character in A:

 ld l, a
 ld h, 0
 add hl, hl
 add hl, hl
 add hl, hl
 B_CALL SFont_Len