Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Applied links to related System Call API's

...

Code Block
languagenone
titleRST 20H, DEFW $7809
IN:
     BHL = dividend
     CDE = divisor

OUT, if call successful:
     Fc = 0
     BHL = quotient
     CDE = remainder

OUT, if call failed:
     Fc = 1
     A = error code:
          RC_FAIL ($16), division by zero attempted)

Registers changed after return:
     ......../IXIY same
     AFBCDEHL/.... different 

Related calls

GN_D16, 16bit unsigned division
GN_Gdn, convert an ASCII string to a binary number
GN_M16, 16bit unsigned multiplication
GN_M24, 24bit unsigned multiplication
GN_Pdn, write number as decimal ASCII string