All pastes #387212 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-03-09 04:53 UTC
rendered paste body
NCLUDE Irvine32.inc

.data
Prompt1 "Input", 0
Prompt2 "Prompt2", 0
UserInput BYTE DUP (?)

.code
main PROC
	mov edx, OFFSET Prompt1
	call WriteString
	call crlf
	mov ecx, 79
	mov ecx, OFFSET UserInput
	mov edx, [ecx]
	call ReadString
	call crlf
	mov edx, OFFSET UserInput
	call WriteString
	call crlf
	mov ecx, OFFSET Prompt2
 	mov edx, OFFSET UserInput
	mov al, [edx]

	.IF (al = 0)
		call WriteString UserInput
		call crlf
		call WriteString
		call CrLf
	.ENDIF
	.IF (al >= 'A') && (al <= 'Z')
		mov al, [al + 'A' - 'a']
		call WriteString
		call crlf
	.ENDIF
	.IF (al >= 'a') && ( al <= 'z')
		call WriteString
 		call crlf
		mov al, [al + 3]
		call WriteString
		call CrLf
	.ELSEIF
		call WriteString
		mov edx, [edx + 1]
		call WriteString
		call CrLf
	.ENDIF
	.IF (al > 'z')
		mov al, [al - 'z' + 'a' + 1]
 		call WriteString
 		call crlf
 		mov edx, al
	 	call WriteString
		call CrLf
 	.ENDIF
 

 
 exit
 main ENDP
 END main