Alex N Posted May 16, 2020 Share Posted May 16, 2020 (edited) Deleted Edited May 18, 2020 by Alex N Deletion Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted May 16, 2020 Share Posted May 16, 2020 (edited) Local label scope (no need for arbitrarily unique label names), clear structure, and outlining in WUDSN IDE. These things become important when your source code is 13,000 lines long. Edited May 16, 2020 by flashjazzcat 1 Quote Link to comment Share on other sites More sharing options...
R0ger Posted May 16, 2020 Share Posted May 16, 2020 (edited) 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 May 16, 2020 by R0ger Quote Link to comment Share on other sites More sharing options...
Alex N Posted May 17, 2020 Author Share Posted May 17, 2020 (edited) Deleted Edited May 18, 2020 by Alex N deletion Quote Link to comment Share on other sites More sharing options...
pps Posted May 18, 2020 Share Posted May 18, 2020 As fjc wrote... Look at the code in WUDSN and you see the main difference and benefit. .proc and .local are so useful in big projects. Quote Link to comment Share on other sites More sharing options...
tebe Posted May 18, 2020 Share Posted May 18, 2020 ??? .rept 100,# lda #2 sta (sm_ptr),y loop%%1 jmp loop%%1 .endr 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.