Also note that in WDSCi you specified an offset, whereas with the
green screen debugger, you specified a number of bytes.

Charles

On Thu, Jul 2, 2009 at 2:05 PM, Charles Wilt<charles.wilt@xxxxxxxxx> wrote:
Aaron,

Don't think that it's weird, but
Offset 0 = 1st byte
Offset 1 = 2nd byte
...
Offset 1023 = 1024th byte
Offset 1024 = 1025th byte

Just have to remember when dealing with pointers (memmory address) and
offsets that offset 0 is the first byte of whatever is being pointed
to.

Charles

On Thu, Jul 2, 2009 at 1:36 PM, Aaron Bartell<aaronbartell@xxxxxxxxx> wrote:
  You statements led me to debug from the good ol' green screen and I am in
  agreement with y'all because when I do an EVAL GDATAPTR1:X 1024 I then see
  the last character being the x'70'.

  So I went back to my "trusted" WDSC and did the following steps (which are
  the same ones that led me to the screen shots):

  1) Right click on gDataPtr and select Monitor Memory->Hex.
  2) Right click on the first address that is now highlighted by default and
  select Go To Address...
  3) Now a non-modal dialog is at the bottom of the Memory view and in the
  drop down I select Go to Offset
  4) In the text box I enter 1024, de-select the Input as Hex, and select
  the OK button.

  The above steps position me to 1025 like you are suggesting and NOT 1024
  (Aaron shakes his fist at the sky).  What the heck!?  Is there some weird
  offset rules with Memory view?  Note this is WDSC v7.0.x

  So that led me to look at the process that I am passing my gDataPtr1 to
  and it is in THERE that my code is slapping me around.  In that code I am
  basically taking the contents of the pointer and converting it to base64
  encoded but what I am NOT doing is stopping at the right point.
  AAAARGGGGHHH!   Completely my oversight, but everyone's comments helped me
  verify that.  For a second I thought the IFS read() api was acting funky
  on me and that would be a very bad thing as I read/write to IFS files A
  LOT (I had a little sweat rolling down my back :-)

  Thanks everybody for responding,
  Aaron Bartell
  [1]http://mowyourlawn.com

  p.s. If you want to see me shave parts of my body please head over to
  [2]http://firstgiving.com/aaronbartell to learn how to make it happen.
  Yes it sounds gross, but it is for a good cause!

References

  Visible links
  1. http://mowyourlawn.com/
  2. http://firstgiving.com/aaronbartell
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.