32-Bit durch 16 Bit oder 24-Bit durch 16-Bit Division

Gast #15333
Lesenswert?
• ▲
▼
;**********************************************************
;BL,AH,AL : CH, CL = BL,AH,AL    REST in DH, DL
DIV24_16:
    LDI  BH, 24
    CLR  DH
    MOV  DL, DH
Loop24:
    LSL  AL
    ROL  AH
    ROL  BL
    ROL  DL
    ROL  DH
    CP   DL, CL
    CPC  DH, CH
    BRLO  Skip24
    SUB  DL, CL
    SBC  DH, CH
    INC  AL
Skip24:
    DEC  BH
    BRNE  Loop24

    RET

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren