nasm

tut fast, noch ein kleiner fehler drin:
;; (c) david vajda
;; nasm/i586/amd64/8 byte sort
;; 10/17/2026

global _start
section     .data
    str8blk7:   db  "abcdefgh"
    str8blk6:   db  "XYZ12345"
    str8blk5:   db  "ABCDEFGH"
    str8blk4:   db  "xyz12345"
    str8blk3:   db  "xyz12346"
    str8blk2:   db  "rs232   "
    str8blk1:   db  "amd64x86"
    str8blk0:   db  "Most Sig"
    crlf:       db  10, 13
section     .text
_start:

    mov rsi, str8blk7
    mov ch, 0x07
l1: mov cl, ch
    mov rdi, rsi
l2: add rdi, 8
    mov rax, [rdi]
    mov rbx, [rsi]
    cmp rax, rbx
    jge j1
    mov rax, [rdi]
    mov rbx, [rsi]
    mov [rdi], rbx
    mov [rsi], rax
j1: dec cl
    jnz l2
    add rsi, 8
    dec ch
    jnz l1

    mov rcx,    str8blk7
l3: mov rax,    0x04
    mov rbx,    0x01
    mov rsi,    rcx
    mov rdx,    8
    int 0x80
    mov rax,    0x04
    mov rbx,    0x01
    mov rcx,    crlf
    mov rdx,    4
    int 0x80
    mov rcx,    rsi
    add rcx,    8
    cmp rcx,    str8blk7 + 64
    jl l3


    mov rax,    0x01
    mov rbx,    0x00
    int 0x80
ausgabe:

david@vajda-breadboard-0000:~$ nasm -f elf64 amd64nasm10172026sort8b.asm
david@vajda-breadboard-0000:~$ ld amd64nasm10172026sort8b.o -o amd64nasm10172026sort8b
david@vajda-breadboard-0000:~$ ./amd64nasm10172026sort8b
rs232
XYZ12345
xyz12345
xyz12346
amd64x86
ABCDEFGH
Most Sig
abcdefgh
david@vajda-breadboard-0000:~$
so, dann machen wir das trotzdem in mmx und tauschen das zur not darueber, ausprobieren. tut einigermassen
;; (c) david vajda
;; nasm/i586/amd64/8 byte sort
;; 10/17/2026

global _start
section     .data
    str8blk7:   db  "abcdefgh"
    str8blk6:   db  "XYZ12345"
    str8blk5:   db  "ABCDEFGH"
    str8blk4:   db  "xyz12345"
    str8blk3:   db  "xyz12346"
    str8blk2:   db  "rs232   "
    str8blk1:   db  "amd64x86"
    str8blk0:   db  "Most Sig"
    crlf:       db  10, 13
section     .text
_start:

    mov rsi, str8blk7
    mov ch, 0x07
l1: mov cl, ch
    mov rdi, rsi
l2: add rdi, 8
    movq mm0, [rdi]
    movq mm1, [rsi]
    pcmpgtb mm0, mm1
    movq rax, mm0
    cmp rax, 0x0000000000000000
    jz j1
    movq mm0, [rdi]
    movq mm1, [rsi]
    movq [rdi], mm1
    movq [rsi], mm0
j1: dec cl
    jnz l2
    add rsi, 8
    dec ch
    jnz l1

    mov rcx,    str8blk7
l3: mov rax,    0x04
    mov rbx,    0x01
    mov rsi,    rcx
    mov rdx,    8
    int 0x80
    mov rax,    0x04
    mov rbx,    0x01
    mov rcx,    crlf
    mov rdx,    4
    int 0x80
    mov rcx,    rsi
    add rcx,    8
    cmp rcx,    str8blk7 + 64
    jl l3


    mov rax,    0x01
    mov rbx,    0x00
    int 0x80
gibt aus:
david@vajda-breadboard-0000:~$ ./amd64nasm10172026sort8bmmx
Most Sig
amd64x86
rs232
xyz12346
xyz12345
abcdefgh
ABCDEFGH
XYZ12345
david@vajda-breadboard-0000:~$ nasm -f elf64 amd64nasm10172026sort8bmmx.asm
david@vajda-breadboard-0000:~$ ld amd64nasm10172026sort8bmmx.o -o amd64nasm10172026sort8bmmx
david@vajda-breadboard-0000:~$ ./amd64nasm10172026sort8bmmx
XYZ12345
ABCDEFGH
abcdefgh
xyz12345
xyz12346
rs232
amd64x86
Most Sig
david@vajda-breadboard-0000:~$
packed und unpacked, heisst, bei bcd, computersysteme 1/2, floating point ieee-754 fehlt noch aufgabe, heisst: 2 bcd zahlen: $0b0001$ und $0b1000$ in einem byte gepackt sind $b0001.1000$ und ungepackt: $0b0000.0001.0000.1000$ ok: dann ieee-754, jetzt?
matrizenmultiplikation, rsa-algorithmus, kleine zahlen, eulertour, tiefensuche, breitensuche, hash und fletcher's und halt automat. richtig, robert sedgewick, pattern matching automat. noch logarithmus 10er und 2er, aber keine reihe uebung. dann, kommen: 2er und 10er logarithmus. zufallszahlen, generieren.