;; (C) David Vajda
;; Intel Div: Quotient + Rest = Dividend/Divisor, mit Intel DIV instruktion
;; gleichzeitig ueben schritliches dividieren, aber nicht Quotient sondern Rest, fuer IBAN
;; Bitte noch Reihe angeben, die schriftliche Division ist
;; 2025-06-08
;; EDX:EAX: durch operanden/divisor in irgendeinem anderen Register
;; Rest: EDX, Quotient EAX s
global _start
section .data
eaxstr: db 0x00, 0x00, 0x00, 0x00
edxstr: db 0x00, 0x00, 0x00, 0x00
section .text
_start:
;; num: 6B9B000002D1
mov edx, 0x00006B9B
mov eax, 0x000002D1
;; mov ecx, 97
;; div ecx
mov ecx, 0x450022D2
div ecx
mov [eaxstr], eax
mov [edxstr], edx
mov edx, 4
mov ecx, eaxstr
mov eax, 0x04
mov ebx, 0x01
mov edx, 4
mov ecx, edxstr
mov eax, 0x04
mov ebx, 0x01
mov eax, 1
mov ebx, 0
int 0x80