Re: A83: ret


[Prev][Next][Index][Thread]

Re: A83: ret




Whenever a program CALLs, the address after the call (PC registe) gets 
PUSHed onto the stack.  Whenever a RET is used, the highest 2 bytes of the 
stack get POPped off, and code proceeds there.  PUSH and POP opcodes also 
use the stack as well, so don't ret after pushing unless you popped it off 
first.

>From: "Jan (belgacom)" <jandebeule@belgacom.net>
>Reply-To: assembly-83@lists.ticalc.org
>To: "TI-83 assembly-83" <assembly-83@lists.ticalc.org>
>Subject: A83: ret
>Date: Wed, 29 Nov 2000 22:01:25 +0100
>
>Can anybody tell me how a program knows when 'ret' is meant to exit to
>program and when it's meant to go back from were the label is called? (i
>hope my question is clear enough...)
>Because i have a lot of problems using 'ret' in my program and my emulator
>always crashes when i want to quit.  if  it's necessary i will show a piece
>of my code (it's written for explorer (ion)), but i hope it's clear enough
>this way.

_____________________________________________________________________________________
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com




Follow-Ups: