Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
Site SearchSite Search   LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
Hexadecimal Output

 
Post new topic   Reply to topic    Forum Index -> Files
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 Reply with quote

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.



HexDebug.bas
 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: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> Files Time synchro. with the server - Timezone/DST with your computer
Page 1 of 1

 


All content Copyright © 2005-2012 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group