Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old October 10th, 2006, 01:45 AM
nuttt nuttt is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2006
Posts: 1 nuttt User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 48 sec
Reputation Power: 0
Need help about assembly language

This is knapsack programme that I will send to teacher.I write this program and can compile but when I run it has that I don't understand.please help me to solve this ploblem in line between call waitMsg.Thank you.
INCLUDE Irvine32.inc
.code
input byte 11,8,7,6,5
found byte "The correct combination is ",0
notfound byte "Not found answer",0
count dword ?
addd byte "We add ",0
current byte ".Current target is "
bigger byte ".Bigger! Discard "
foundc byte ".Found the combination!"
output byte ?
main PROC
mov eax,0
mov ecx,lengthof input
mov edi,0
L1: mov esi,0
mov al,20
push ecx
L2:
.IF (input[edi]>al)
mov edx,offset addd
call writeString
call writeDec
mov edx,offset bigger
call writeString
inc edi
jmp J1
.ELSEIF (input[edi]==al)
mov edx,offset addd
call writeString
call writeDec
mov edx,offset foundc
mov bl,input[edi]
mov output[esi],bl
inc esi
jmp J2
.ENDIF
sub al,input[edi]
mov bx,0
mov bl,input[edi]
call waitMsg
mov output[esi],bl ;<-------Error
call waitMsg
inc esi
inc edi
loop L2
pop ecx
J1: loop L1
mov edx,offset notfound
call writestring
jmp O
L3: mov eax,0
J2: mov edx,offset found
call writestring
mov ecx,esi
mov esi,0
mov al,output[esi]
call writedec
loop L3
O: exit
main ENDP
END main

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > Need help about assembly language


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

IBM developerWorks




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway