HKCHaN92's Profile User Rating: -----

Reputation: 2 Apprentice
Group:
Active Members
Active Posts:
85 (0.07 per day)
Joined:
23-July 11
Profile Views:
1,450
Last Active:
User is offline Oct 28 2013 08:48 AM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
Who Cares
Favorite Gaming Platform:
PC
Your Car:
Honda
Dream Kudos:
0
Icon   HKCHaN92 has not set their status

Posts I've Made

  1. In Topic: Using RadASM how do I prevent the console window from exiting?

    Posted 30 Sep 2013

    Using temp value to move a value that is in a register into temp value then move value from another register into that register and then move the value in temp into the second register.
  2. In Topic: Using RadASM how do I prevent the console window from exiting?

    Posted 30 Sep 2013

    Apparently I spoke too soon I just tested with a different set of values and it gave me the wrong min and max I probably just have something set wrong or something like that I'll figure it out. Anyway thanks again for all your help.
  3. In Topic: Using RadASM how do I prevent the console window from exiting?

    Posted 30 Sep 2013

    Ok I made the changes and fixed it and it works now. But the thing is we haven't learned the loop instruction yet so I'm not sure if he'll be ok with that or not but we haven't learned xchg either and I'm probably keeping that. Also I was working on the sort funciton in between classes and I posted that when it was almost time for my next class to start and I still had to get across campus to get there so I forgot to change jl noSwap to jg noSwap so sorry about that. Also we haven't gotten to functions yet so I was just going off one of the examples in the book and didn't know that you only did the offset thing with parameters so sorry about that as well. Thanks so much for your help. Also I was wondering once I've cleaned it up a bit could you look at my code sometime 2mrrw if I send it to you by private message with the io.obj file (if it lets me attach them) and io.h. I understand if you don't want to or you don't have time but I'm still really new at this and our teacher hasn't gone over a whole lot because he gets sidetracked really easily so he ends up talking about stuff that isn't important and before he realizes it class is over. Anyway I greatly appreciate your help and your patience.
  4. In Topic: Using RadASM how do I prevent the console window from exiting?

    Posted 30 Sep 2013

    Ok so I changed it but it still stops working before it can even finish one iteration. Here is the code and the code that calls the sort and prints array.
    ;IN MAIN
    resetArray:
    	mov edi, offset array
    	mov ecx, 0
    	mov eax, 0
    callSort:
    	push offset numVls
    	push offset array
    	output CRLF
    	output tstMsg2
    	call sort
    	output CRLF
    	output tstMsg2
    printArray:
    	output CRLF
    	mov eax, [edi+4*ecx]
    	mov intPrint, eax
    	dtoa intPrint, eax
    	push offset intPrint
    	call stripBlanks
    	output intPrint
    	output CRLF
    	cmp ecx, numVls
    	je  Grades
    	inc ecx
    	jmp printArray
    
    
    sort proc
    	mov ecx, numVls
    	mov edi, offset array
    	dec ecx 
    	output CRLF
    	output tstMsg2
    outerLoop:
    	push ecx                 
    	mov edi, array
    	output CRLF
    	output tstMsg3          ;stops working after this point
    compare:
    	mov eax, [edi]
    	cmp [edi + 4], eax
    	jl  noSwap
    	xchg eax, [edi+4]
    	mov  [edi], eax
    	output CRLF
    	output tstMsg4
    noSwap:
    	add edi, 4
    	jmp compare
    	pop ecx
    	jmp outerLoop
    	output CRLF
    	output tstMsg1
    finished:
    	pop ecx
    	output CRLF
    	output tstMsg2
    	ret	
    sort endp
    
    
  5. In Topic: Using RadASM how do I prevent the console window from exiting?

    Posted 29 Sep 2013

    Ok, so I waited to do the sorting algorthim last and I know this probably sucks and is totally wrong but it's the best I could do after working on this program all day today and most of the day yesterday but here is the bubble sort algorithm I have so far.
    sort proc
    	
    outerLoop:
    	mov ecx, 0
    	mov edi, offset array
    compare:
    	mov ebx, 0
    	mov edx, 0
    	mov ebx, [edi + 4 * ecx]
    	inc ecx
    	mov edx, [edi + 4 * ecx]
    	cmp ebx, edx
    	jg swap
    continue:
    	inc ecx
    	add edi, 4
    	cmp ecx, n
    	je outerLoop
    	jmp compare
    	
    jmp finished
    swap:
    	mov temp2, ebx
    	mov ebx, edx
    	mov edx, temp2
    	mov [edi + 4 * ecx], ebx
    	dec ecx
    	mov [edi + 4 * ecx], ebx
    	jmp continue
    finished:
    	ret
    
    sort endp
    
    

    I don't know if it's lack of sleep, or just mental exhaustion from working on this program all day or both but I can't seem to figure out what condition I need to check before jmp finished and there are probably lots of other errors in there too. If you could look at and help me fix it I would greatly appreciate it this is the last thing (hopefully, unless further tests prove otherwise) that I need to do before this program is finished and I can move on to my Java program that is due next monday and hopefully finish it early enough so I can go home next weekend and spend time with my family. Anyway, any and all help is appreciated.

My Information

Member Title:
D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Interests:
Anime, Video Games (mainly RPGs and MMORPGs), Manga, Young Adult Novels (supernatural ones like Fallen Series, Mortal Instruments and Clockwork Angel Series, Cirque Du Freak, ect), Movies (action adventure, superhero films, films based on books I've read as long as they don't suck, some romantic comedies, some drama depending, some romance, and some foreign, and some classics), into several different TV shows, and of course I'm interested in programming.
Programming Languages:
C++, Learning Java and Assembly

Contact Information

E-mail:
Private

Friends

Comments

HKCHaN92 has no profile comments yet. Why not say hello?