|
|
| Author |
Message |
dkinzer Site Admin
Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR
|
|
Posted: 09 November 2005, 22:06 PM Post subject: Hexadecimal Output |
|
|
These routines may be useful for displaying data during debugging.
{Edit}
Since the v1.0 release of the compiler includes the function CStrHex(), the need for these routines has diminished. I'll leave them in place for instructional purposes.
| Description: |
| Hexadecimal output of 8-, 16-, and 32-bit values. Also, output of RAM contents in hex. |
|
 Download |
| Filename: |
HexDebug.bas |
| Filesize: |
2.7 KB |
| Downloaded: |
3079 Time(s) |
Last edited by dkinzer on 28 November 2005, 2:10 AM; edited 1 time in total |
|
| Back to top |
|
 |
mikep
Joined: 24 Sep 2005
Posts: 765
Location: Austin, TX
|
|
Posted: 12 November 2005, 0:54 AM Post subject: |
|
|
I have some comments on this code which may improve it:
1. For modules I always use Private and Public for functions, subroutines and other module global data so that the Public interface is very clear to anyone who wants to use the module. A header comment explaining the public interface is always advisable too. I usually push private stuff to the bottom of the file so that it is not the first thing you see.
2. The two routines dbgDspWordHex and dbgDspDWordHex uses extra stack space and I would make them call dbgDspNibbleHex directly. Even though there is more stack space with ZBasic over its predecessor, we should still strive to save stack space where we can.
3. What about providing additional subroutines for dumping out integers, longs, singles and perhaps even strings.
Mike
http://home.austin.rr.com/perks/micros/
|
|
| Back to top |
|
 |
|