No responce yet, so Im jumping in with what little I understand of NM.
I ran this code test:
#include <string.h>
#include <stdio.h>
#include <mpe.h>
int main () {
char a [10] = "ABCDEF";
char b [10] = "abcdef";
printf ( "strcmp %d\n", strcmp ( a, b ));
}
did ccxllk, and run test;debug, set break at strcmp, and verified register/parameters
nmdebug> b ?strcmp
nmdebug> c
Break at: NM [1] USER 1c0.000be5dc ?strcmp
nmdebug> won
GR$ ipsw=0006000f=jthlnxbCVmrQPDI priv=3 pc=000001c0.000be5dc pin=000000e8
r0 00000000 40100080 000050f3 418361d8 r4 d66a67c0 00000001 00000000 00000000
r8 00000000 00000000 00000000 00000000 r12 00000000 00000000 00000000 00000000
r16 00000000 00000000 00000000 45460000 r20 000001c0 000be5dc 61626364 00000000
r24 00000000 41837374 41837368 4163a000 r28 41641b79 00000080 418373b0 000050f3
nmP$ USER 1c0.be5d4 XL.PUB.SYS/?_strcmp+$14 Level 0,0
000be5d4: ?_strcmp+$14 e0402000 BE 0(4,2)
000be5d8: ?_strcmp+$18 4bdb3fc1 LDW -32(0,30),27
000be5dc: [1]> ?strcmp e8400028 BL strcmp,2
000be5e0: ?strcmp+$4 d45f0c1e DEP 31,31,2,2
000be5e4: ?strcmp+$8 4bd53fc9 LDW -28(0,30),21
000be5e8: ?strcmp+$c 4bc23fd1 LDW -24(0,30),2
000be5ec: ?strcmp+$10 00153820 MTSP 21,4
Commands
nmdebug> woff
nmdebug> dv r26,4,b
VIRT $9e0.41837368 $ 41424344 45460000 00000000 61626364 ABCD EF.. .... abcd
nmdebug> dv r25,4,b
VIRT $9e0.41837374 $ 61626364 65660000 00000000 41837370 abcd ef.. .... A.sp
nmdebug> c
strcmp -32
End Run
Here my understanding is that r26 has 1st parm, r25 has 2nd.
r26 = 41837368 "ABCDEF"
r25 = 41837374 "abcdef"
R16=00000000 00000000 00000000 41639d3e R20=000001cc 000935dc 00000020 00000001
R24=00000001 41638330 00400000 4163b000 R28=00000080 00000001 41838270 0000b077
Your r26, 1st parm looks suspicious.
I would say to check your parameters to strcmp.
********************
* Keven Miller KC7LYD
* [log in to unmask] (Salt Lake City, Utah, USA)
********************
|