Главная » Просмотр файлов » Volume 3 General-Purpose and System Instructions

Volume 3 General-Purpose and System Instructions (794097), страница 18

Файл №794097 Volume 3 General-Purpose and System Instructions (Intel and AMD manuals) 18 страницаVolume 3 General-Purpose and System Instructions (794097) страница 182019-04-28СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 18)

If the bit index is in a register, the instruction selects a bit position relative to the bit basein the range –263 to +263 – 1 if the operand size is 64, –231 to +231 – 1, if the operand size is 32, and–215 to +215 – 1 if the operand size is 16. If the bit index is in an immediate value, the bit selected isthat value modulo 16, 32, or 64, depending on operand size.When the instruction attempts to copy a bit from memory, it accesses 2, 4, or 8 bytes starting from thespecified memory address for 16-bit, 32-bit, or 64-bit operand sizes, respectively, using the followingformula:Effective Address + (NumBytesi * (BitOffset DIV NumBitsi*8))When using this bit addressing mechanism, avoid referencing areas of memory close to address spaceholes, such as references to memory-mapped I/O registers.

Instead, use a MOV instruction to load aregister from such an address and use a register form of the BT instruction to manipulate the data.MnemonicOpcodeDescriptionBT reg/mem16, reg160F A3 /rCopy the value of the selected bit to the carry flag.BT reg/mem32, reg320F A3 /rCopy the value of the selected bit to the carry flag.BT reg/mem64, reg640F A3 /rCopy the value of the selected bit to the carry flag.BT reg/mem16, imm80F BA /4 ibCopy the value of the selected bit to the carry flag.BT reg/mem32, imm80F BA /4 ibCopy the value of the selected bit to the carry flag.BT reg/mem64, imm80F BA /4 ibCopy the value of the selected bit to the carry flag.Related InstructionsBTC, BTR, BTS68BTInstruction Reference24594—Rev. 3.13—July 2007AMD64 TechnologyrFLAGS AffectedIDVIPVIFACVMRFNTIOPLOFDFIFTFU2120191817161413–12111098SFZFAFPFCFUUUUM76420Note: Bits 31–22, 15, 5, 3, and 1 are reserved.

A flag set to 1 or cleared to 0 is M (modified). Unaffected flags areblank. Undefined flags are U.ExceptionsExceptionVirtualReal 8086 ProtectedCause of ExceptionStack, #SSXXXA memory address exceeded the stack segment limit or wasnon-canonical.General protection,#GPXXXA memory address exceeded a data segment limit or was noncanonical.XA null data segment was used to reference memory.Page fault, #PFXXA page fault resulted from the execution of the instruction.Alignment check,#ACXXAn unaligned memory reference was performed whilealignment checking was enabled.Instruction ReferenceBT69AMD64 Technology24594—Rev.

3.13—July 2007BTCBit Test and ComplementCopies a bit, specified by a bit index in a register or 8-bit immediate value (second operand), from a bitstring (first operand), also called the bit base, to the carry flag (CF) of the rFLAGS register, and thencomplements (toggles) the bit in the bit string.If the bit base operand is a register, the instruction uses the modulo 16, 32, or 64 (depending on theoperand size) of the bit index to select a bit in the register.If the bit base operand is a memory location, bit 0 of the byte at the specified address is the bit base ofthe bit string. If the bit index is in a register, the instruction selects a bit position relative to the bit basein the range –263 to +263 – 1 if the operand size is 64, –231 to +231 – 1, if the operand size is 32, and–215 to +215 – 1 if the operand size is 16.

If the bit index is in an immediate value, the bit selected isthat value modulo 16, 32, or 64, depending the operand size.This instruction is useful for implementing semaphores in concurrent operating systems. Such anapplication should precede this instruction with the LOCK prefix. For details about the LOCK prefix,see “Lock Prefix” on page 8.MnemonicOpcodeDescriptionBTC reg/mem16, reg160F BB /rCopy the value of the selected bit to the carry flag, thencomplement the selected bit.BTC reg/mem32, reg320F BB /rCopy the value of the selected bit to the carry flag, thencomplement the selected bit.BTC reg/mem64, reg640F BB /rCopy the value of the selected bit to the carry flag, thencomplement the selected bit.BTC reg/mem16, imm80F BA /7 ibCopy the value of the selected bit to the carry flag, thencomplement the selected bit.BTC reg/mem32, imm80F BA /7 ibCopy the value of the selected bit to the carry flag, thencomplement the selected bit.BTC reg/mem64, imm80F BA /7 ibCopy the value of the selected bit to the carry flag, thencomplement the selected bit.Related InstructionsBT, BTR, BTS70BTCInstruction Reference24594—Rev.

3.13—July 2007AMD64 TechnologyrFLAGS AffectedIDVIPVIFACVMRFNTIOPLOFDFIFTFU2120191817161413–12111098SFZFAFPFCFUUUUM76420Note: Bits 31–22, 15, 5, 3, and 1 are reserved. A flag set to 1 or cleared to 0 is M (modified). Unaffected flags areblank. Undefined flags are U.ExceptionsExceptionStack, #SSVirtualReal 8086 ProtectedCause of ExceptionXXXA memory address exceeded the stack segment limit or wasnon-canonical.XXXA memory address exceeded a data segment limit or was noncanonical.XThe destination operand was in a non-writable segment.XA null data segment was used to reference memory.General protection,#GPPage fault, #PFXXA page fault resulted from the execution of the instruction.Alignment check,#ACXXAn unaligned memory reference was performed whilealignment checking was enabled.Instruction ReferenceBTC71AMD64 Technology24594—Rev.

3.13—July 2007BTRBit Test and ResetCopies a bit, specified by a bit index in a register or 8-bit immediate value (second operand), from a bitstring (first operand), also called the bit base, to the carry flag (CF) of the rFLAGS register, and thenclears the bit in the bit string to 0.If the bit base operand is a register, the instruction uses the modulo 16, 32, or 64 (depending on theoperand size) of the bit index to select a bit in the register.If the bit base operand is a memory location, bit 0 of the byte at the specified address is the bit base ofthe bit string.

If the bit index is in a register, the instruction selects a bit position relative to the bit basein the range –263 to +263 – 1 if the operand size is 64, –231 to +231 – 1, if the operand size is 32, and–215 to +215 – 1 if the operand size is 16. If the bit index is in an immediate value, the bit selected isthat value modulo 16, 32, or 64, depending on the operand size.This instruction is useful for implementing semaphores in concurrent operating systems. Suchapplications should precede this instruction with the LOCK prefix. For details about the LOCK prefix,see “Lock Prefix” on page 8.MnemonicOpcodeDescriptionBTR reg/mem16, reg160F B3 /rCopy the value of the selected bit to the carry flag, thenclear the selected bit.BTR reg/mem32, reg320F B3 /rCopy the value of the selected bit to the carry flag, thenclear the selected bit.BTR reg/mem64, reg640F B3 /rCopy the value of the selected bit to the carry flag, thenclear the selected bit.BTR reg/mem16, imm80F BA /6 ibCopy the value of the selected bit to the carry flag, thenclear the selected bit.BTR reg/mem32, imm80F BA /6 ibCopy the value of the selected bit to the carry flag, thenclear the selected bit.BTR reg/mem64, imm80F BA /6 ibCopy the value of the selected bit to the carry flag, thenclear the selected bit.Related InstructionsBT, BTC, BTS72BTRInstruction Reference24594—Rev.

3.13—July 2007AMD64 TechnologyrFLAGS AffectedIDVIPVIFACVMRFNTIOPLOFDFIFTFU2120191817161413–12111098SFZFAFPFCFUUUUM76420Note: Bits 31–22, 15, 5, 3, and 1 are reserved. A flag set to 1 or cleared to 0 is M (modified). Unaffected flags areblank. Undefined flags are U.ExceptionsExceptionStack, #SSVirtualReal 8086 ProtectedCause of ExceptionXXXA memory address exceeded the stack segment limit or wasnon-canonical.XXXA memory address exceeded a data segment limit or was noncanonical.XThe destination operand was in a non-writable segment.XA null data segment was used to reference memory.General protection,#GPPage fault, #PFXXA page fault resulted from the execution of the instruction.Alignment check,#ACXXAn unaligned memory reference was performed whilealignment checking was enabled.Instruction ReferenceBTR73AMD64 Technology24594—Rev. 3.13—July 2007BTSBit Test and SetCopies a bit, specified by bit index in a register or 8-bit immediate value (second operand), from a bitstring (first operand), also called the bit base, to the carry flag (CF) of the rFLAGS register, and thensets the bit in the bit string to 1.If the bit base operand is a register, the instruction uses the modulo 16, 32, or 64 (depending on theoperand size) of the bit index to select a bit in the register.If the bit base operand is a memory location, bit 0 of the byte at the specified address is the bit base ofthe bit string.

Характеристики

Тип файла
PDF-файл
Размер
1,98 Mb
Материал
Тип материала
Высшее учебное заведение

Список файлов книги

Свежие статьи
Популярно сейчас
Как Вы думаете, сколько людей до Вас делали точно такое же задание? 99% студентов выполняют точно такие же задания, как и их предшественники год назад. Найдите нужный учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6392
Авторов
на СтудИзбе
307
Средний доход
с одного платного файла
Обучение Подробнее