Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include io.asm
- sstack segment stack
- db 128 dup(?)
- sstack ends
- sdata segment
- str1 db 16 dup(0)
- len1 dw 0
- str2 db 128 dup(0)
- len2 dw 0
- str3 db 256 dup(0)
- strspec db 1bh, "[1;5;36;40m$"
- strret db 1bh, "[0m$"
- sdata ends
- scode segment
- assume cs:scode, ds:sdata, ss:sstack
- start:
- mov ax,sdata
- mov ds,ax
- mov es,ax
- mov cx,0
- mov bx,0
- while1:
- inch al
- mov dl,24h
- cmp al,dl
- je while1end
- mov [str1+bx],al
- inc cx
- inc bx
- jmp while1
- while1end:
- mov len1,cx
- mov cx,0
- mov bx,0
- while2:
- inch al
- mov dl,24h
- cmp al,dl
- je while2end
- mov [str2+bx],al
- inc cx
- inc bx
- jmp while2
- while2end:
- mov len2,cx
- mov si,offset str1
- mov di,offset str3
- mov cx,len1
- rep movsb
- mov si,offset str2
- mov di,offset str3
- add di,[len1]
- mov cx,len2
- rep movsb
- mov ax,len1
- mov bx,len2
- add bx,ax
- mov al,24h
- mov [str3+bx],al
- mov dx,offset strspec
- outstr
- mov dx,offset str3
- outstr
- mov dx,offset strret
- outstr
- finish
- scode ends
- end start
Add Comment
Please, Sign In to add comment