Skip to content

Commit

Permalink
i386/a-b-bootblock: factor test memory addresses out into constants
Browse files Browse the repository at this point in the history
So that we have less magic numbers to deal with. This also allows us to
reuse these in the following commits.

Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20230919102346.2117963-2-d-tatianin@yandex-team.ru>
  • Loading branch information
d-tatianin authored and Juan Quintela committed Oct 4, 2023
1 parent 2ada4b6 commit 67aeae7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/migration/i386/a-b-bootblock.S
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,22 @@ start: # at 0x7c00 ?
mov $16,%eax
mov %eax,%ds

# Start from 1MB
.set TEST_MEM_START, (1024*1024)
.set TEST_MEM_END, (100*1024*1024)

mov $65,%ax
mov $0x3f8,%dx
outb %al,%dx

# bl keeps a counter so we limit the output speed
mov $0, %bl
mainloop:
# Start from 1MB
mov $(1024*1024),%eax
mov $TEST_MEM_START,%eax
innerloop:
incb (%eax)
add $4096,%eax
cmp $(100*1024*1024),%eax
cmp $TEST_MEM_END,%eax
jl innerloop

inc %bl
Expand Down

0 comments on commit 67aeae7

Please sign in to comment.