I have questions:
1) Program to get input from user till 'z' or 'Z' is inputted
the program will check for the chars, and print
(new line) small chars
(new line) big chars
(new line) numbers
[without 'z' or 'Z']
can't use variables.
Small chars: dfsdgdfvcvb
Big chars: AS
This is code for question 1:
STA SEGMENT STACK DB 100H DUP (0) STA ENDS CODE SEGMENT ASSUME CS:CODE,SS:STA MAIN: MOV BP, SP MOV BX, BP SUB BP, 2 MOV CX, 0 INPUT: MOV AH, 01H INT 21H INC CX CMP AL, 'z' JE TOPRINT CMP AL, 'Z' JE TOPRINT MOV AH, 0 PUSH AX MOV AX, 0 JNE INPUT MOV DI, CX TOPRINT: POP DX CMP DX, 'a' JL NEXT CMP DX, 'z' JG NEXT MOV AH, 02H INT 21H CMP DX, 'A' JL NEXT CMP DX, 'Z' JG NEXT MOV AH, 02H INT 21H CMP DX, '0' JL NEXT CMP DX, '9' JG NEXT MOV AH, 02H INT 21H NEXT: SUB BP, 2 DEC CX CMP CX, 0 JMP TOPRINT MOV AX, 4C00H INT 21H CODE ENDS END MAIN
2) Program with string size Define N, program will take input from the user, and will take only numbers from the input and put them to string with N size, the input size is N. and print message with the string (must have only numbers from input) and amount of the numbers.
example (string size 10)
input : 1adr1t23g7
The String of numbers are : 11237 and Tolat Numbers are : 5
Stuck with question 1, not understand the subject and cant continue to question 2.
thanks to every one who may help me