83Plus:BCALLs:4A02

From WikiTI
Jump to: navigation, search

Synopsis

Official Name: ConvKeyToTok

BCALL Address: 4A02

Converts a key into it's corresponding token.

Inputs

  • A: The key code
  • keyExtend: The second byte of the key code if it's an extended key code

Outputs

  • DE: Contains the token, D will be zero for a one byte token.

Destroys

  • All

Example

The code below will display ‘1’ at the cursor location.

LD A,k1 ;Convert ‘1’ into token. 
B_CALL ConvKeyToTok 
B_CALL PutTokString ;Takes DE as input

Credits and Contributions

  • Michael Vincent: For documenting this B_CALL