Jump to content
IGNORED

MADS .proc/.endp vs labels


Recommended Posts

I don't understand what is the code supposed to do.

 

Anyway, I use proc mostly simply like procedures, but sometimes as scopes for labels. I mean having local labels is the main reason. I like to name loop labels l1, l2, addresses  for self-modifying code a1,a2 etc. and like this they don't have to be unique across the whole project.

 

Also I call procedures by the name only, and sometimes I later change the proc to macro. Proc is useful for profiling, that's why I start with proc, even if it's called from just one place.

 

The most common use where it's just a scope is in NMI handler.  I used to make one proc named NMI, and in it there were labels VBI and DLI. But that way I have to enter NMI.VBI into debugger when I want to jump to VBI handler. So instead of that I now use proc for each NMI, VBI and DLI. The code itself is just the same, I'm not using JSR in this case, but it's simply more handy in debugger.

Edited by R0ger
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...