Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Основная";
Текущий архив: 2003.05.26;
Скачать: [xml.tar.bz2];

Вниз

Assembler   Найти похожие ветки 

 
Serg!   (2003-05-14 14:58) [0]

Здравствуйте!
Нормального форума по assembler не нашёл, пришлось обратиться к вам.
Есть опкод ror, вторым параметром которого должно быть число,
но когда я ввожу переменную типа byte, она не воспринимаются как число, как решить эту проблему?

Вот пример:

i, b: byte;
...
asm

mov ah, b
mov al, i
ror ah, al // Несопоставимые параметры! (Что-то в этом роде...)


 
MBo   (2003-05-14 15:03) [1]

допустимый синтаксис
ROR dest Rotate dest right by 1 bit position
dest,CL ...by CL bit positions
dest,cnt ...by immediate count bit positions (mod 32)


 
Digitman   (2003-05-14 15:06) [2]

RCL/RCR/ROL/ROR-—Rotate

These instructions shift (rotate) the bits of the first operand (destination operand) the number of
bit positions specified in the second operand (count operand) and stores the result in the desti-nation
operand. The destination operand can be a register or a memory location; the count
operand is an unsigned integer that can be an immediate or a value in the CL register. The
processor restricts the count to a number between 0 and 31 by masking all the bits in the count
operand except the five least-significant bits.


 
BillyJeans   (2003-05-14 15:06) [3]

asm

mov ah, b
mov cl, i
ror ah, cl


 
Skier   (2003-05-14 15:07) [4]

var
i, b: byte;
begin
asm
mov ah, b
mov cl, i
ror ah, cl //cl или число. если cl, то учитываются только младшие 5 бит
end; //asm
end;



Страницы: 1 вся ветка

Форум: "Основная";
Текущий архив: 2003.05.26;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.44 MB
Время: 0.008 c
1-83470
Johnmen
2003-05-15 09:57
2003.05.26
Каталог для инсталляции по умолчанию


3-83366
Kirill_S
2003-05-05 18:51
2003.05.26
Господа, помогите с QReport !


1-83456
vidiv
2003-05-15 02:08
2003.05.26
MemoryStream - Memory + Disk


3-83354
dito
2003-05-05 13:20
2003.05.26
Удаление из MS Access с помощью ADO


3-83407
gary5555
2003-05-06 18:00
2003.05.26
Нумерация строк с помощью RecNo.





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский