R
R
rbondarenko2017-12-05 16:51:58
Python
rbondarenko, 2017-12-05 16:51:58

How to solve these problems in 8086 assembler?

the first task is to develop an algorithm and write a program that translates a 2-byte integer into
a character string that represents the number in hexadecimal system (4 digits).
according to the first task, I came to the following algorithm:
We take the high byte of the number,
we get the high 4 bits, this will be the character index in the string '0123456789ABCDEF',
we get the character in the string by the index,
we get the lower 4 bits
, we get the character in the string by the index,
we get the next byte of the number
But with the implementation on assembler is hard.
second task - Write a program that converts 2-byte signed numbers into a 5-digit
decimal number, represented as a series of characters (6 bytes).
I write assembly language of microprocessor 8086

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
o5a, 2019-09-21
@OctorberMyMonth

row in WAYS_TO_WIN takes one tuple per loop.
Accordingly, for the 1st iteration of the loop, row = (0, 1, 2), i.e. row[0] = 0 and board[row[0]] = board[0]
This is normal list indexing.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question