Zelaron Gaming Forum  
Stats Arcade Portal Forum FAQ Community Calendar Today's Posts Search
Go Back   Zelaron Gaming Forum > The Zelaron Nexus > Science and Art > Tech Help

 
 
Thread Tools Display Modes

 
Assembly help
Reply
Posted 2004-06-27, 11:38 AM
You know assembly? ICQ, AIM, or PM me. I need help with a fairly simple problem with my homework.
D3V said:
This message is hidden because D3V is on your ignore list.
What is it they say about silence being golden?
Old
Profile PM WWW Search
Medieval Bob enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzMedieval Bob enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
Medieval Bob
 



 
Reply
Posted 2004-06-27, 11:40 AM in reply to Medieval Bob's post "Assembly help"
Why don't you just post the problem?
Old
Profile PM WWW Search
Demosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to be
 
Demosthenes
 



 
Reply
Posted 2004-06-27, 12:24 PM in reply to Demosthenes's post starting "Why don't you just post the problem?"
Okay, need help again.

Code:
;include main 32-bit header
include irvine32.inc

.data
;program data
input byte 20 dup (?)

.code
         ;program code
main proc
	mov edx, offset input		;sets edx to the beginning of input

getnums:
	call readhex
	cmp eax, 99h			;this checks for an exit flag
	je continue			;exits if flag is given
	mov [edx], al
	add edx, 1
	cmp edx, offset input + 28	;checks for the 28th number (total in example)
        jc getnums			;loop if not finished
	
continue:
	mov ecx, edx			;makes a copy of edx to know when to stop
	mov edx, offset input		;sets edx back to the beginning of input
	
printnum:
	mov eax, [edx]
	call writehex
		

	;exit the program
        exit
main endp
end main
My call to writehex works, but I need to print out the values entered. As it is, if I enter A, it loops, then I enter 99 to get out of the loop, I have a problem.

The register, eax, is 0000000A. So, when I call writehex, it writes 0000000A. I just need it to print A. How do I do that?
D3V said:
This message is hidden because D3V is on your ignore list.
What is it they say about silence being golden?

Last edited by Medieval Bob; 2004-06-27 at 12:55 PM.
Old
Profile PM WWW Search
Medieval Bob enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzMedieval Bob enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
Medieval Bob
 



 
Reply
Posted 2004-06-27, 12:55 PM in reply to Medieval Bob's post starting "Okay, need help again. ;include main..."
*bump* Read above post.
D3V said:
This message is hidden because D3V is on your ignore list.
What is it they say about silence being golden?
Old
Profile PM WWW Search
Medieval Bob enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzMedieval Bob enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
Medieval Bob
 
 

Bookmarks

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules [Forum Rules]
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 11:06 PM.
'Synthesis 2' vBulletin 3.x styles and 'x79' derivative
by WetWired the Unbound and Chruser
Copyright ©2002-2008 zelaron.com
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.