I’m trying to get an IPL going and while chasing
down misterious bugs I notice this:
jmp st3
st4:
push %cs
call st6
mov $7,%bl
mov $0x0e, %ah
mov $‘C’, %al
int $0x10
c: jmp c
int $0x19
st6:
mov $7,%bl
mov $0x0e, %ah
mov $‘X’, %al
int $0x10
X: jmp X
Output from ndisasm:
000000B4 EBCB jmp short 0x81
000000B6 0E push cs
000000B7 66E80C00 call dword 0xc7
000000BB 0000 add [bx+si],al
000000BD B307 mov bl,0x7
000000BF B40E mov ah,0xe
000000C1 B043 mov al,0x43
000000C3 CD10 int 0x10
000000C5 EBFE jmp short 0xc5
000000C7 CD19 int 0x19
000000C9 B307 mov bl,0x7
000000CB B40E mov ah,0xe
000000CD B058 mov al,0x58
000000CF CD10 int 0x10
Notice how the third instruction, call indicates it’s calling 0xc7.
That wrong the call iinstruction should call function at address 0xc9
not 0xc7?
Who’s wrong, the assembler, the dissasembler or me.
I’ve tried this with 6.1 and it’s doing the same thing.
Mario Charest <goto@nothingness.com> wrote:
Hi, Mario.
Can you provide more context? Your test case is working for me.
I added an “st3:” label on the first line, and used the following
command lines:
qcc disasm.s -c
ndisasm -b 32 disasm.o
The relevant section is below - note that the call has the
right address:
00000034 EBFE jmp short 0x34
00000036 0E push cs
00000037 E80C000000 call 0x48
0000003C B307 mov bl,0x7
0000003E B40E mov ah,0xe
00000040 B043 mov al,0x43
00000042 CD10 int 0x10
00000044 EBFE jmp short 0x44
00000046 CD19 int 0x19
00000048 B307 mov bl,0x7
0000004A B40E mov ah,0xe
0000004C B058 mov al,0x58
0000004E CD10 int 0x10
Let me know.
GP
I’m trying to get an IPL going and while chasing
down misterious bugs I notice this:
jmp st3
st4:
push %cs
call st6
mov $7,%bl
mov $0x0e, %ah
mov $‘C’, %al
int $0x10
c: jmp c
int $0x19
st6:
mov $7,%bl
mov $0x0e, %ah
mov $‘X’, %al
int $0x10
X: jmp X
Output from ndisasm:
000000B4 EBCB jmp short 0x81
000000B6 0E push cs
000000B7 66E80C00 call dword 0xc7
000000BB 0000 add [bx+si],al
000000BD B307 mov bl,0x7
000000BF B40E mov ah,0xe
000000C1 B043 mov al,0x43
000000C3 CD10 int 0x10
000000C5 EBFE jmp short 0xc5
000000C7 CD19 int 0x19
000000C9 B307 mov bl,0x7
000000CB B40E mov ah,0xe
000000CD B058 mov al,0x58
000000CF CD10 int 0x10
Notice how the third instruction, call indicates it’s calling 0xc7.
That wrong the call iinstruction should call function at address 0xc9
not 0xc7?
Who’s wrong, the assembler, the dissasembler or me.
I’ve tried this with 6.1 and it’s doing the same thing.
“Graeme Peterson” <gp@qnx.com> wrote in message
news:a7adj9$6go$1@nntp.qnx.com…
Mario Charest <> goto@nothingness.com> > wrote:
Hi, Mario.
Can you provide more context? Your test case is working for me.
I added an “st3:” label on the first line, and used the following
command lines:
qcc disasm.s -c
ndisasm -b 32 disasm.o
The -b32 did it. Strange cause the assembly code is 16 bits. Oh well.
The relevant section is below - note that the call has the
right address:
00000034 EBFE jmp short 0x34
00000036 0E push cs
00000037 E80C000000 call 0x48
0000003C B307 mov bl,0x7
0000003E B40E mov ah,0xe
00000040 B043 mov al,0x43
00000042 CD10 int 0x10
00000044 EBFE jmp short 0x44
00000046 CD19 int 0x19
00000048 B307 mov bl,0x7
0000004A B40E mov ah,0xe
0000004C B058 mov al,0x58
0000004E CD10 int 0x10
Let me know.
GP
I’m trying to get an IPL going and while chasing
down misterious bugs I notice this:
jmp st3
st4:
push %cs
call st6
mov $7,%bl
mov $0x0e, %ah
mov $‘C’, %al
int $0x10
c: jmp c
int $0x19
st6:
mov $7,%bl
mov $0x0e, %ah
mov $‘X’, %al
int $0x10
X: jmp X
Output from ndisasm:
000000B4 EBCB jmp short 0x81
000000B6 0E push cs
000000B7 66E80C00 call dword 0xc7
000000BB 0000 add [bx+si],al
000000BD B307 mov bl,0x7
000000BF B40E mov ah,0xe
000000C1 B043 mov al,0x43
000000C3 CD10 int 0x10
000000C5 EBFE jmp short 0xc5
000000C7 CD19 int 0x19
000000C9 B307 mov bl,0x7
000000CB B40E mov ah,0xe
000000CD B058 mov al,0x58
000000CF CD10 int 0x10
Notice how the third instruction, call indicates it’s calling 0xc7.
That wrong the call iinstruction should call function at address 0xc9
not 0xc7?
Who’s wrong, the assembler, the dissasembler or me.
I’ve tried this with 6.1 and it’s doing the same thing.
I had my own IPL too and found the almost same problem (in previous version
at least). Linux version was compiled fine. Compiler mixed the index
registers. But did not try for latest version of asm, and can’t say anything
now: i had to modify code. But that was not disassembler.
“Mario Charest” <goto@nothingness.com> wrote in message
news:a7ag3h$d9$1@inn.qnx.com…
“Graeme Peterson” <> gp@qnx.com> > wrote in message
news:a7adj9$6go$> 1@nntp.qnx.com> …
Mario Charest <> goto@nothingness.com> > wrote:
Hi, Mario.
Can you provide more context? Your test case is working for me.
I added an “st3:” label on the first line, and used the following
command lines:
qcc disasm.s -c
ndisasm -b 32 disasm.o
The -b32 did it. Strange cause the assembly code is 16 bits. Oh well.
The relevant section is below - note that the call has the
right address:
00000034 EBFE jmp short 0x34
00000036 0E push cs
00000037 E80C000000 call 0x48
0000003C B307 mov bl,0x7
0000003E B40E mov ah,0xe
00000040 B043 mov al,0x43
00000042 CD10 int 0x10
00000044 EBFE jmp short 0x44
00000046 CD19 int 0x19
00000048 B307 mov bl,0x7
0000004A B40E mov ah,0xe
0000004C B058 mov al,0x58
0000004E CD10 int 0x10
Let me know.
GP
I’m trying to get an IPL going and while chasing
down misterious bugs I notice this:
jmp st3
st4:
push %cs
call st6
mov $7,%bl
mov $0x0e, %ah
mov $‘C’, %al
int $0x10
c: jmp c
int $0x19
st6:
mov $7,%bl
mov $0x0e, %ah
mov $‘X’, %al
int $0x10
X: jmp X
Output from ndisasm:
000000B4 EBCB jmp short 0x81
000000B6 0E push cs
000000B7 66E80C00 call dword 0xc7
000000BB 0000 add [bx+si],al
000000BD B307 mov bl,0x7
000000BF B40E mov ah,0xe
000000C1 B043 mov al,0x43
000000C3 CD10 int 0x10
000000C5 EBFE jmp short 0xc5
000000C7 CD19 int 0x19
000000C9 B307 mov bl,0x7
000000CB B40E mov ah,0xe
000000CD B058 mov al,0x58
000000CF CD10 int 0x10
Notice how the third instruction, call indicates it’s calling 0xc7.
That wrong the call iinstruction should call function at address 0xc9
not 0xc7?
Who’s wrong, the assembler, the dissasembler or me.
I’ve tried this with 6.1 and it’s doing the same thing.