home *** CD-ROM | disk | FTP | other *** search
- ; original code by Colin Stearman
- CODE SEGMENT
- ORG 100H
- ASSUME CS:CODE,DS:CODE,ES:CODE
-
- START:
- jmp begin
- db 'ߥ.ÑîkådëMû$'
- begin: MOV AH,15 ; GET VIDEO STATE
- INT 10H
- MOV DX,2000 ; BYTES TO IN 80X25 SCREEN
- MOV BX,0B000H ; MONO SCREEN
- CMP AL,7
- JE screen
- MOV BX,0B800H ; COLOR SCREEN
- CMP AL,3 ; IS IT COLOR TEXT?
- JA EXIT ; Bye Bye
- CMP AL,1 ; 80X25 COLOR?
- JA screen
- SHR DX,1 ; ONLY 1000 BYTES TO DO
- screen: MOV ES,BX ; set es to screen segment
- diss: MOV CX,DX ; set bytes in screen
- XOR BX,BX ; set flag to say we changed a byte
- XOR DI,DI ; start at offset zero
- mainloop:
- MOV AX,ES:[DI] ; get character and attribute
- CMP Al,20H ; is it a space, nothing to change?
- JZ next ; yes so do nothing
- CMP AL,' ' ; second stage filter
- JL increase ; is it less than a space?
- DEC AL ; no so decrease 1 towards space
- JMP SHORT movit
- increase:
- INC AL ; increase towards space
- movit:
- MOV ES:[DI],AX
- INC BX ; setting changed flag
- next:
- INC DI ; next word
- INC DI
- LOOP mainloop ; do all bytes in screen
- CMP BX,00 ; did we change something?
- JNZ diss ; yes so do it all over till all spaces
- EXIT:
- MOV AH,4CH ; return to DOS
- INT 21H
-
-
- CODE ENDS
- END START
-