Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with code, crashing

Status
Not open for further replies.

Jouster

Programmer
Dec 4, 2000
82
US
Hi, I am wrinting a porgram for my assembly class and this little snippet keeps crashing and I don't understnd why. Could someone please point out what I am doing wrong?

; Program Description:Uses a procedure to contantenate two strings. Must have available space in target string.
; Date Created:4/25/04
; Last Modification Date:

INCLUDE Irvine32.inc

Str_concat PROTO,
ptrSource:pTR BYTE,
ptrTarget:pTR BYTE

.data

targetStr BYTE "ABCDE", 10 DUP(0)
sourceStr BYTE "FGH", 0

.code
main PROC
INVOKE Str_concat, ADDR targetStr, ADDR sourceStr
exit ; exit to operating system
main ENDP

Str_concat PROC,
ptrSource:pTR BYTE,
ptrTarget:pTR BYTE

Str_concat ENDP

; (insert additional procedures here)

END main
 
Need a 'ret' command before endp of Str_concat. All procedures need ret except main, which has exit. Cant see all the code, but also looks like you're missing 'start' and 'end start'.

Thaz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top