|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Assembly outdec help
If anyone has any knowledge of 8086 assembly,can you please help with a quick question
The below Prints A - Z(conditional loop)putting a space between letter so it will look like A B C D E F G when printed.. Code:
;Prints out all characters from A TO Z with a Space between each letter title program test5.asm .model small .stack 100h .data char1 db 0 ; declared variable .code mov ah ,02h ; mov dl, 'A' ;print out A int 21h ; again: mov char1,dl ;save what's in dl to variable mov ah,02 ; mov dl,20h ;print a space int 21h ; mov dl,char1 ;restore cmp dl,'Z' ;compares whats in dl(A) with Z je outof ; add dl,1 ; int 21h ; jmp again outof: mov ax,4C00h ; int 21h ; end what I'm trying to do now is print off A - Z but display each letters corresponding ASCII value..for example A 65 B 66 C 67 D 68 I've know I need to use outdec to print the letters decimal..but I dont know how to get whats in dl, 'A' to outdec? (ps)im using tasm and sorry if this is the wrong type of post for this section.... |
|
#2
|
||||
|
||||
|
Thread moved. Best of luck to you.
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by sizeablegrin, etienne141 and L7Sqr, superior C/C++ programmers of the month |
|
#3
|
|||
|
|||
|
Quote:
i am just starting into assembly programming, i am currently trying to trace a program step by step to determine a value of a certain register for the particular line but unfortunately, i dont understand how it goes... i am working on this code i found from somewhere, it says that it will display a message only if correct password is entered by a user... my concerns arre as follows: the code is uncommented,and it is very hard for me to trace it(each line's registers value,and of course to find out the password) as i want since i honestly dont understand yet...i want to learn but how can i go on if there is no one to lead on and show me some samples?i hope you all guys understand my situation..thank so much...and please do help me by commenting each line of the code below.i'll appreciate greatly if you'll do..of course,thank you so much for the time.more power! ------------------------------------------------------------------ .MODEL TINY .CODE ORG 100H START: JMP BEGIN DATA1 DB 0A3H, 0A1H, 8FH, 0E9H, 8CH, 0ABH, 0DAH, 0A9H DB 95H, 0BAH, 0DAH, 0A7H, 8EH, 0EEH, 88H, 0A7H DATA2 DB 9DH, 0A6H, 8EH, 0EFH, 0DBH, 0EFH, 0DAH, 87H DB 0DAH, 0A6H, 95H, 0BEH, 9FH, 0EEH, 83H, 0A1H DATA3 DB 8FH, 0E9H, 96H, 0A2H, 0DAH, 0BEH, 9BH, 0BDH DB 89H, 0EEH, 8EH, 0A6H, 9FH, 0EEH, 8EH, 0ABH DATA4 DB 99H, 0A6H, 94H, 0A7H, 99H, 0AFH, 96H, 0EEH DB 9FH, 0B6H, 9BH, 0A3H, 0D4H, 0E0H, 0D4H, 0EAH DATA5 DB 15 DUP(24H) DATA6 DB "Enter the password: $" DATA7 DB "Don't push it...exciting...$" BEGIN: LEA DX, DATA6 MOV AH, 9 INT 21H XOR SI, SI INPUT: MOV AH, 1 INT 21H CMP AL, 0DH JZ PROCESS MOV BYTE PTR [DATA5 + SI], AL INC SI CMP SI, 0AH JZ WHAT_THE JMP INPUT PROCESS: CLD LEA SI, DATA1 MOV DI, SI LEA CX, DATA5 SUB CX, SI SHR CX, 1 CONVERT: LODSW XOR AX, 0CEFAH STOSW LOOP CONVERT MOV AL, 0 LEA BX, DATA5 SUB BX, 2 XLAT MOV DL, AL LEA SI, BYEBYE SUB SI, 0BH PUSH SI MOV DI, SI MOV CX, 000AH DECODE: LODSB XOR AL, DL STOSB LOOP DECODE MOV CX, 000AH POP SI LEA DI, DATA5 REPE CMPSB JNE WHAT_THE LEA DX, DATA1 MOV AH, 9 INT 21H JMP BYEBYE WHAT_THE: LEA DX, DATA7 MOV AH,9 INT 21H JMP BYEBYE DB 64H, 41H, 46H, 40H, 0EH, 1DH, 14H, 1FH, 18H,0AH, 00H BYEBYE: MOV AX, 4C00H INT 21H END START ------------------------------------------------------------------ i am hoping to read more from you guys... Edit/Delete Message |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Other Programming Languages > Assembly outdec help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|