Sign Extended Instruction
From: Bryan Parkoff (spamtrap_at_crayne.org)
Date: 03/17/05
- Next message: Benjamin David Lunt: "Re: Writting an OS and want to write FAT support for it?"
- Previous message: Ali.Rahebi_at_gmail.com: "Writting an OS and want to write FAT support for it?"
- Next in thread: Matt: "Re: Sign Extended Instruction"
- Reply: Matt: "Re: Sign Extended Instruction"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 17 Mar 2005 22:27:48 +0000 (UTC)
It would be nice to have CBW instruction and MOVSZ instruction. Low
byte's 7th bit is turned on to show negative before high byte is set to $FF,
otherwise low byte's 7th bit is turned off to show positive before high byte
is set to $00.
I have to find other way to overwrite $FF to low byte after low byte is
read to detect 7th bit rather than to use high byte without having to use
CBW instruction nor MOVSZ instruction. It is because I am very curious to
study how binary in this logic work. I try to compare x86 to other
processors which other processors do not have sign extended instruction so
they have to write their own routine.
The routine is to read low byte's 7th bit. If 7th bit is true, it
branches to overwrite low byte with $FF, otherwise if 7th bit is false, it
branches to overwrite low byte with $00. I think that branch is only the
option to test 7th bit, but it can waste couple clock cycles.
Is there a way to use other instructions such as AND, OR, XOR, NEG, NOT,
etc to manipulate low byte's 7th bit by filling $FF or $00 without using
branches, CBW instruction, nor MOVSZ instruction. I would like to see how
it works.
I am not sure if IA-64 has any sign extended instruction. Please let me
know as soon as possible. Thanks...
Bryan Parkoff
- Next message: Benjamin David Lunt: "Re: Writting an OS and want to write FAT support for it?"
- Previous message: Ali.Rahebi_at_gmail.com: "Writting an OS and want to write FAT support for it?"
- Next in thread: Matt: "Re: Sign Extended Instruction"
- Reply: Matt: "Re: Sign Extended Instruction"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|