09.06.2013 Views

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

as: A sse m bier<br />

sub<br />

subb<br />

test<br />

testb<br />

wait<br />

xchg<br />

xchgb<br />

xlat<br />

xor<br />

xorb<br />

Byte Instructions<br />

subtract<br />

subtract byte<br />

test<br />

test byte<br />

wait while TEST pin<br />

exchange<br />

exchange byte<br />

translate<br />

exclusive OR<br />

exclusive OR byte<br />

*<br />

*<br />

*<br />

*<br />

*<br />

<strong>XENIX</strong> Programming<br />

The <strong>XENIX</strong> assembler extends the definition of several instruction mne monics to include<br />

an explicit byte "b" suffix. This suffix forces the operands in the instruction to be<br />

treated as bytes when they would otherwise be treated as words. There are the<br />

following byte instructions (not including byte string instructions):<br />

adcb imulb rclb shlb<br />

ad db incb rcrb shrb<br />

an db movb rolb subb<br />

cmpb mulb rorb testb<br />

decb negb salb xchgb<br />

divb notb sarb xorb<br />

idivb orb sbbb<br />

The byte instructions are especially useful when operating on memory operands defined<br />

with the .byte directive. Since as does not assign an explicit type to symbols created<br />

with the .byte or .word directives, it cannot detect the size of the associated item when<br />

given in an instruction. For example, if test_byte and test_ word have been defined as<br />

test byte:<br />

test - word :<br />

then the statements<br />

.byte 1<br />

.word 1<br />

negb test byte<br />

neg test - word<br />

are required to operate on these values correctly. If neg were applied to test_byte, part<br />

of test_word would be destroyed in the operation.<br />

7-16

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!