Renamed x64 to x86

This commit is contained in:
2025-02-05 23:16:18 +01:00
parent 37afbde0da
commit d4f9071ee4
80 changed files with 1757 additions and 1757 deletions

37
src/x86/Jump.go Normal file
View File

@ -0,0 +1,37 @@
package x86
// Jump continues program flow at the new address.
// The address is relative to the next instruction.
func Jump8(code []byte, address int8) []byte {
return append(code, 0xEB, byte(address))
}
// JumpIfLess jumps if the result was less.
func Jump8IfLess(code []byte, address int8) []byte {
return append(code, 0x7C, byte(address))
}
// JumpIfLessOrEqual jumps if the result was less or equal.
func Jump8IfLessOrEqual(code []byte, address int8) []byte {
return append(code, 0x7E, byte(address))
}
// JumpIfGreater jumps if the result was greater.
func Jump8IfGreater(code []byte, address int8) []byte {
return append(code, 0x7F, byte(address))
}
// JumpIfGreaterOrEqual jumps if the result was greater or equal.
func Jump8IfGreaterOrEqual(code []byte, address int8) []byte {
return append(code, 0x7D, byte(address))
}
// JumpIfEqual jumps if the result was equal.
func Jump8IfEqual(code []byte, address int8) []byte {
return append(code, 0x74, byte(address))
}
// JumpIfNotEqual jumps if the result was not equal.
func Jump8IfNotEqual(code []byte, address int8) []byte {
return append(code, 0x75, byte(address))
}