Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7821095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:32:05+00:00 2026-06-02T07:32:05+00:00

I have a question about very low-level thing. We were analyzing how the microprocessor

  • 0

I have a question about very low-level thing. We were analyzing how the microprocessor performs simple assembler programs, we were using logic analyzer, so I have .law file. This is the code we used (in comments I placed opcodes):

mov ax, 1000
mov ds, ax
mov bx, 2000
mov ax, 0aa

mov cx, 100

petla
    push cx ;51
    mov [bx],al ;8807
    mov ax,[bx] ;8B07
    inc al;FEc0
    pop cx;59
loop ;here goes address

we wrote it in debug program, assembled and watched the output. Here is the image:

http://img805.imageshack.us/img805/241/mikro.png

now, here is the strange (at least for me) thing:

Data bus:51 - push cx
Data bus:8807 - mov [bx],al
Data bus:0001 - writing to 1EF6A
Data bus:8B07 - mov ax,[bx]
Data bus AA, address bus:12000 - that is writing al to [bx] (ds - 1000, bx - 2000)

All of a sudden he writes to some place in memory the value that is in the CX register (I suspect that 1EF6A is the physical address of the SS:SP). Is it because of the

push CX?

If yes, why does he do it after the

mov [bx],al

and why the writing to [bx] occurred so late?

I was thinking that pushing value to stack should be done immediately after the push instruction.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T07:32:06+00:00Added an answer on June 2, 2026 at 7:32 am

    (Sorry, I don’t yet have enough rep to comment, so I’m resorting to writing this an an answer.)

    @Andna: this is an 8088, right? That’s why memory access in the analyzer trace is byte-at-a-time. So what you’re seeing is the result of the 8088’s prefetch unit, which blindly reads instruction bytes from memory and holds them in a short (4-byte) prefetch queue in the hope that the execution unit will want to use them later.

    Data operations that result from the instructions that the execution unit actually executes will appear on the bus some time later. That’s why the CX value written to memory doesn’t show up immediately after the push CX instruction is read, and why the AL write doesn’t appear on the bus until after the MOV AX,[BX] instruction has been read. It’s also why, at the end of the loop (which unfortunately is not shown in this trace snapshot), you’ll see the prefetch unit reading instructions that come after the loop instruction. However, the execution unit will not execute those instructions.

    You’re correct to worry about possible bad side effects of the prefetch unit’s readahead, but the danger arises only when you’re dealing with a memory location that is written after the prefetch unit has already collected the previous value from that location, and that can only happen when you’re dealing with a memory location just above the current point of program execution. If you’re ever in that situation then you must do something to invalidate the content of the prefetch queue before you try to read that newly-written location. Executing a JMP will do that.

    @Zack: there’s no out-of-order execution here, no multicore or multithreading, not even any cacheing. Just a tiny amount of blind, speculative prefetch. Yes, the prefetch does make following the trace very slightly trickier than, say, an 8085.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My knowledge about javascript is very low; thus, this is a simple question. I
i have a question about a very hard development thing: its okay choose ios4
I have a very special question about son manipulation and the as_class parameter by
I'm very new to Maven, and have a question about building multiple Maven projects.
please help me, i'm very newbie i have question about datatables (jquery plug in)
I guess this is very obvious, but I have a question about loading data.
I am very new to HDL language. I have a question about how to
I'm very new to Joomla. I have a question about components/modules. I'm doing the
I have question about normalization. Suppose I have an applications dealing with songs. First
I have question about interpreting strings as packed binary data in C++. In python,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.