| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
| Assembly Questions and Answers for Assembly here! |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi I'm using tasm programming in 8086 and trying to create a program that gets a digit from the user and then graws 5 squares each with a side length of the digit.
When my program reaches the sub method for drawing the square i get an error from the computer, it may have somthing to do with running a sub from within a sub and stack opperations. Can some one please help me!! P.S There are also a lot of other problems with the program, that i have not implemented yet, and if u have any inside knowledge on how to do these extra things it would be greatly appresiated |
|
#2
|
||||
|
||||
|
Re: TASM Troubles
Try to send parameters to your subroutines via registers, and not stack. That would make code much clearer, and it would be harder to accidentally swap arguments when reading them from a stack.
Also, if you use tasm/tlink, you possibly also have td.exe (Turbo Debugger), very good tool for debugging purposes. Just type in commandline 'td myexe.exe' and keep hitting F7 and watch registers and memory window. Firs thing I found in your program is that it draws outside of screen, at coords like 4200h. Either coords calculation is broken, or arguments are swapped when reading them from stack. Hob
__________________
B+! 'There is no cat' - A. Einstein Use [code] [/code] tags! Did YOU share your photo with us at CG Members photo gallery ? |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|