ALP Question Midsem '22
user_1944374
assembly_x86
a year ago
731 B
4
Indexable
Never
.model tiny .486 .data dat1 db "SidK123!?#" dcnt dw 10 small1 db 10 dup(?) caps1 db 10 dup(?) num1 db 10 dup(?) spec1 db 10 dup(?) stk dw 20 dup(?) stk2 label word .code .startup lea si, dat1 lea di, caps1 lea bx, small1 lea dx, num1 lea bp, spec1 mov cx, dcnt x1: call sep1 loop x1 .exit sep1 PROC NEAR mov al, [si] cmp al, 'a' jb x2 cmp al, 'z' ja x2 mov ax, di mov di, bx movsb mov bx, di mov di, ax jmp xe x2: cmp al, '1' jb x3 cmp al, '9' ja x3 mov ax, di mov di, dx movsb mov dx, di mov di, ax jmp xe x3: cmp al, 'A' jb x4 cmp al, 'Z' ja x4 movsb jmp xe x4: mov ax, di mov di, bp movsb mov bp, di mov di, ax xe: ret sep1 endp end