For Programmers: Free Programming Magazines  


Home > Archive > ASM370 > May 2006 > call instruction









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author call instruction
CN99

2006-05-22, 6:58 pm

Hi all:

Can anybody tell me what the value will be in ax, after the 'call' excuted,
and why? Thanks!
To me:
pop ax // ax = 8
add ax, ax // ax = 16
pop bx // bx = 1000
add ax, bx // ax = 1000 + 16 -> 1016?


1000:0 b8 00 00 mov ax, 0
1000:3 9A 09 00 00 10 call far ptr s
1000:8 8 40 inc ax
1000:9 9 58 s:pop ax
add ax, ax
pop bx
add ax, bx


SkippyPB

2006-05-22, 6:58 pm

On Mon, 22 May 2006 22:06:46 +0800, "CN99" <leon800219@yahoo.com.cn>
enlightened us:

>Hi all:
>
>Can anybody tell me what the value will be in ax, after the 'call' excuted,
>and why? Thanks!
>To me:
>pop ax // ax = 8
>add ax, ax // ax = 16
>pop bx // bx = 1000
>add ax, bx // ax = 1000 + 16 -> 1016?
>
>
>1000:0 b8 00 00 mov ax, 0
>1000:3 9A 09 00 00 10 call far ptr s
>1000:8 8 40 inc ax
>1000:9 9 58 s:pop ax
> add ax, ax
> pop bx
> add ax, bx
>



Wrong newsgroup. This is the IBM mainframe assembler newsgroup.

Regards,
////
(o o)
-oOO--(_)--OOo-


"I told my wife that black underwear turns me on, so
she didn't wash my shorts for a month."
-- Milton Berle
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Remove nospam to email me.

Steve
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com