Not meaning to set a forced commitment but it'd be neat idea to share your favorite CL routine w/ the rest of the folks, no matter how simple it is, FOCAL, MCODE, all goes :-)
Preaching with the example, here's a short one that makes vieving the contects of RAM and FLASH a very easy affair.
Often I need to check for the right content of a given block, since I'm always moving stuff in RAM - and lately also in FLASH as I'm adding more modules and new versions of existing ones to the library. Using YPEEK is of course the way, but it's a bit tedious to remember the format and proper syntax so a little driver routine was in order.
Here it is, make sure you have the CLUTILS and the AMCOSX plugged (or the CCDOSX, or the original CCD for that matter). The only requirement is to make YINPT programmable - which it isn't in the posted versions. For that just change the first word in the MCODE from its current value 000 (NOP) to 260 (SETHEX), a good neutral byte.
01* LBL "YEDIT"
02 YINPT
03 ASTO X
04 12
05 WSIZE
06 CLX
07 LBL 05
08 CLA
09 ARCL Y
10 ARCLH
11 "|- -8888"
12 YPEEK
13 PROMPT
14 E
15 +
16 GTO 05
17 END
To use it, input the first three digits of the (HEX) address (a.k.a. block) at the "Y: _" prompt and hit R/S. All bytes values will be shown with each consecutive R/S action, increasing automatically.
To jump to another location within the same block, just input the offset from the current one in X (in decimal of course), press "+" to advance or "-" to back up, and resume with R/S to get there.
YEDIT is just a minimalistic routine to review the values, but will be easy to enhance it to also modify them using YPOKE, getting closer to a real editor. Anyone going for that?
Hope you enjoy it.
Note: if changing the NOP to HEXEDIT is not for you, just program the function using the XROM XX,NN while the CLUTILS is *not* plugged, then plug it before running it.
Edited: 16 May 2012, 7:44 a.m. after one or more responses were posted