CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Other Programming > Assembly
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Assembly Questions and Answers for Assembly here!

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old April 17th, 2005, 08:26 AM
    Bad_Programmer Bad_Programmer is offline
    Member
     
    Join Date: Apr 2005
    Posts: 37
    Bad_Programmer is an unknown quantity at this point (<10)
    Exclamation TASM Troubles

    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
    Attached Files
    File Type: txt program.txt (5.9 KB, 198 views)
    Reply With Quote
      #2    
    Old April 20th, 2005, 05:16 AM
    Hobson's Avatar
    Hobson Hobson is offline
    Senior Member
     
    Join Date: Dec 2004
    Location: Poland
    Posts: 1,163
    Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)Hobson has much to be proud of (1500+)
    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 ?
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Other Programming > Assembly


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting 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 -5. The time now is 03:19 AM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009