GIDForums  

Go Back   GIDForums > Computer Programming Forums > Assembly Language
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 08-Mar-2008, 15:47
MindGames MindGames is offline
New Member
 
Join Date: Mar 2008
Posts: 1
MindGames is on a distinguished road

Assembly program - 16 errors, trying to understand why


Hello,

I have an Assembly program which my lecturer wrote on the board, which I am sure I wrote down correctly. However I'm using an Assembler called 68000 IDE. When I build thi, I get 14 errors in all, but I don't how to fix them,understand them. Can anyone help me please?

Thanks for any help

Here's the code:

Code:
; Count the number of a's in the input ORG $400 MOVE.L #$FFF0,A7 CR EQU 13 main: CLR.L counta LEA prompt, A0 JSR printstr loop JSR input JSR output; echo cmp.b #CR, D0 beq print cmp.b #'a', D0 bne loop add.w #1, counta bra loop print LEA counta, A0 JSR printstr move.w counta,D0 cmp.w #10, D0 BEQ ERR add.b #48, D0 JSR output JSR exit err LEA error, A0 JSR printstr jsr exit
  #2  
Old 08-Mar-2008, 19:32
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 5,303
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold

Re: Assembly program - 16 errors, trying to understand why


Quote:
Originally Posted by MindGames
...Can anyone help me...
That is not very likely without your telling us what the error messages were and what lines they referred to. Even then there's not a really big chance unless someone has that exact same development environment. Maybe...


Regards,

Dave
  #3  
Old 08-Mar-2008, 21:40
TurboPT's Avatar
TurboPT TurboPT is offline
Senior Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 1,231
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: Assembly program - 16 errors, trying to understand why


Here's the error list generated by that environment:
http://img238.imageshack.us/my.php?i...kerrorsee3.png

Many of the errors, based on what I can tell, seem related to the JSR instruction(s). No sub-routines seem to exist for those jumps. (unless more code exists that isn't posted)

This is just a start, there might be more.

EDIT:
I did this to reduce the errors to 5: (see the last 5 lines)
Code:
; Count the number of a's in the input ORG $400 MOVE.L #$FFF0,A7 CR EQU 13 main: CLR.L counta LEA prompt, A0 JSR printstr loop JSR input JSR output ; echo cmp.b #CR, D0 beq print cmp.b #'a', D0 bne loop add.w #1, counta bra loop print LEA counta, A0 JSR printstr move.w counta, D0 cmp.w #10, D0 BEQ ERR add.b #48, D0 JSR output JSR exit err LEA error, A0 JSR printstr jsr exit printstr nop input nop output nop prompt nop exit nop
The other 5 errors are at lines with the red text, so I'm not sure what to do with them.
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
Last edited by TurboPT : 08-Mar-2008 at 22:18.
  #4  
Old 23-Mar-2008, 07:58
Peter_APIIT Peter_APIIT is offline
Regular Member
 
Join Date: May 2007
Location: Malaysia
Posts: 545
Peter_APIIT can only hope to improve

Re: Assembly program - 16 errors, trying to understand why


What is this program all about ?
 
 

Recent GIDBlogProblems with the Navy (Enlisted) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Program Not working, assembly language czerdrill Assembly Language 1 28-Oct-2007 15:13
Two-Tier data dissemination code installation problem nidhibansal1984 Computer Software Forum - Linux 6 16-Sep-2007 11:13
BOOKEEPING program, HELP!! yabud C Programming Language 10 17-Nov-2006 04:48
Help with a complex program lordfuoco C++ Forum 5 24-Jun-2006 07:03

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 00:27.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.