Write this then 
Author Message
 Write this then

Here is a problem for all you gurus out there

This is to be written in 80x86 code assembled by MASM

display the contents of memory location "NUM1"; increment "NUM1"
repeatedly until it equals D0(base 16) while keeping count of the number
of INC's in a separate location. Finally display the number of times the
INC instruction was carried out.

Ive looked at this problem for a while now and cant seem to come up
with a solution. Any help would be greatly appeciated

Mail me with any solutions or tips




Fri, 13 Jul 2001 03:00:00 GMT  
 Write this then
I think it would be helpful if you would spend even more time and do your
homework yourself. You might learn something in the process that can
help you solve next weeks assignment ...

Just in case. Which part of the problem seems difficult to solve to you?

-- Norbert

Quote:

>Here is a problem for all you gurus out there

>This is to be written in 80x86 code assembled by MASM

>display the contents of memory location "NUM1"; increment "NUM1"
>repeatedly until it equals D0(base 16) while keeping count of the number
>of INC's in a separate location. Finally display the number of times the
>INC instruction was carried out.

>Ive looked at this problem for a while now and cant seem to come up
>with a solution. Any help would be greatly appeciated

>Mail me with any solutions or tips





Sat, 14 Jul 2001 03:00:00 GMT  
 Write this then
On 25 Jan 1999 20:16:57 GMT, "Andy Hipkiss"

Quote:

> Here is a problem for all you gurus out there

> This is to be written in 80x86 code assembled by MASM

> display the contents of memory location "NUM1"; increment "NUM1"
> repeatedly until it equals D0(base 16) while keeping count of the number
> of INC's in a separate location. Finally display the number of times the
> INC instruction was carried out.

> Ive looked at this problem for a while now and cant seem to come up
> with a solution. Any help would be greatly appeciated

> Mail me with any solutions or tips



<Jack>

#1.  Newsgroups are not for the purpose of doing homework assignments.

#2.  The entire operation is meaningless unless at least two
additional pieces of information are supplied:  The size of the
variable NUM1 and its initial value.

</Jack>
--
Do not email me with questions about programming.
Post them to the appropriate newsgroup.
Followups to my posts are welcome.



Sat, 14 Jul 2001 03:00:00 GMT  
 Write this then

Quote:

>Here is a problem for all you gurus out there
>This is to be written in 80x86 code assembled by MASM

The "homework alert" alarm is sounding!
Next time at least post a little sample code. BTW: what are you studying
in the UK that requires assembler?

Quote:
>display the contents of memory location "NUM1"; increment "NUM1"
>repeatedly until it equals D0(base 16) while keeping count of the number
>of INC's in a separate location.

Try:

incno db 0   ; Up to 0xD0 will require <255 INCs, so a byte will do
num1  db 0    

incloop:
inc byte ptr incno
inc byte ptr num1
cmp byte ptr num1, 0D0h
jl incloop

mov ah, byte ptr incno
call show_number_in_ah_with_your_favourite_routine

Quote:
>Finally display the number of times the
>INC instruction was carried out.

Just use your favourite display decimal routine.

Quote:
>Mail me with any solutions or tips

Absolutely not. Usenet is not a write-only medium: you post here, so
read here. Especially when you expect others do your homework for you.
--
Supporting Acorn Users North East (ACNE)

We are John Cage of Borg. Assimilation troubles us;
we have to take a moment. Poughkeepsie.



Sat, 14 Jul 2001 03:00:00 GMT  
 Write this then

Quote:
>#2.  The entire operation is meaningless unless at least two
>additional pieces of information are supplied:  The size of the
>variable NUM1 and its initial value.

Not to mention that we'd have to know the memory map for the system this is
supposed to run on...  (assuming he's  not just talking about a standard PC,
which perhaps he was)

rob



Sat, 14 Jul 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. self-booting pmode program written in assembler written in sh

2. Writing operators vs. writing procedures

3. Clarification: read/write slow, and TCPSocket and sys{read,write}

4. read/write slow, and TCPSocket and sys{read,write}

5. 'Write attribute vs Write procedure.

6. Help wanted on reading/writing disk and writing your own OS

7. How to write PCI read and Write

8. Use write to write a table.

9. Help wanted on reading/writing disk and writing your own OS

10. Pentium (and later) write after write contention?

11. Weird behaviour of file.write() (no data written)?

12. Who wrote originally wrote posixfile.py?

 

 
Powered by phpBB® Forum Software