?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1.  ifndef included_xmul2
  2.  define included_xmul2
  3.  include "../../common/pushpop.asm"
  4.  include "../../common/mov.asm"
  5. xmul2:
  6.   call pushpop
  7.   ld d,b
  8.   ld e,c
  9.   call mov8
  10.   ld c,(hl)
  11.   inc hl
  12.   ld b,(hl)
  13.   inc c
  14.   jr nz,xmul2ok;+_
  15.   ld a,b
  16.   inc b
  17.   xor b
  18.   jp m,xmul2ok;+_
  19.   xor b
  20.   sla b
  21.   rla
  22.   rr b
  23.   ;ld a,$80  ;If this overflow occurs, then A must currently be %1111111x :D
  24.   dec de
  25.   ld (de),a
  26.   inc de
  27. xmul2ok;_:
  28.   ex de,hl
  29.   ld (hl),c
  30.   inc hl
  31.   ld (hl),b
  32.   ret
  33.  endif
  34.