83Plus:BCALLs:4012

From WikiTI
Revision as of 15:35, 7 April 2005 by Woozle (Talk | contribs)

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

Synopsis

Official Name: DivHLByA

BCALL Address: 4012

Divides the value in HL by the value in A.

Inputs

  • HL: integer
  • A: integer

Outputs

  • HL = HL / A
  • A = HL mod A

Registers Destroyed

  • none

Comments

Simple enough to implement if speed is important.

Example

ld hl,13
ld a,5
B_CALL DivHLByA  ;should return HL=2, A=3