I want simulate 8051 using the x86 instruction. In 32 bits mode, I have to rotate left to get the carry flag. it is more steps to get the overflow flag. Do you know how to AL, BL, CL, DL, to do arithmetic operation and update the flags.
How can x86 arithmetic in 8 bit mode and update the flags?
200 Views Asked by qjpdzjcb At
1
There are 1 best solutions below
Related Questions in ASSEMBLY
- Is there some way to use printf to print a horizontal list of decrementing hex digits in NASM assembly on Linux
- How to call a C language function from x86 assembly code?
- Binary Bomb Phase 2 - Decoding Assembly
- AVR Assembly Clock Cycle
- Understanding the differences between mov and lea instructions in x86 assembly
- ARM Assembly code is not executing in Vitis IDE
- Which version of ARM does the M1 chip run on?
- Why would %rbp not be equal to the value of %rsp, which is 0x28?
- Move immediate 8-bit value into RSI, RDI, RSP or RBP
- Unable to run get .exe file from assembly NASM
- DOSbox automatically freezes and crashes without any prompt warnings
- Load function written in amd64 assembly into memory and call it
- link.exe unresolved external symbol _mainCRTStartup
- x86 Wrote a boot loader that prints a message to the screen but the characters are completely different to what I expected
- running an imf file using dosbox in parallel to a game
Related Questions in X86
- How to call a C language function from x86 assembly code?
- the difference between two style of inline ASM
- Understanding the differences between mov and lea instructions in x86 assembly
- ARM Assembly code is not executing in Vitis IDE
- x86 - compare numbers and push the result onto the stack
- Seeking for the the method for adding the DL (data register) value to DX register
- link.exe unresolved external symbol _mainCRTStartup
- x86 Wrote a boot loader that prints a message to the screen but the characters are completely different to what I expected
- How does CPU tell between MMIO(Memory Mapped IO) and normal memory access in x86 architecture
- Why do register arg values need to be re-assigned in NASM after an int 0x80 system call?
- Why does LLVM-MCA measure an execution stall?
- Why does shr eax, 32 not do anything?
- Evaluating this in Assembly (A % B) % (C % D)
- Understanding throughput of simd sum implementation x86
- Making portable execution errors
Related Questions in 8051
- Identify the checksum algorithm
- Trying to implement countdown in assembly language for 8051
- Having problems with timer timings in 8051 assembly
- 8051 Keil c51 Unable to properly use the INTERNAL EEPROM, on 89c52 or STC12C5A60S2
- How to create 2 square waveforms of 50% duty cycle in 8051 with Assembly
- Using SST89E516RD controller, how to write the variable values into internal flash memory and read back from flash memory
- Is there a better method to store values in consecutive registers using indirect addressing?
- Keil c51 When an array is declared, uart sends the first character twice, strange behavior of uVision 4
- Problem with DPTR arithmetic in 8051 assembly
- Assembly Language for MCU 8051 IDE with AT89S52 microcontroller
- Does anyone know the In Circuit Programming algorithm for the Philips P89LPC901 microcontroller
- how can I interface seven segment display with keypad to show values? simulation doesn't work?
- Program the flash memory of an 8051
- Assembler 8051 how to fix indexing on not first character
- Assembler How work with index in db Beginner
Related Questions in 8-BIT
- Quantization 4 bit and 8 bit - error in 'quantization_config'
- Troubleshooting FP8 Conversion Discrepancy from Float32
- why the weight of a 8-bit quantized LLM (using GPTQ) is float 16
- No source code lines were found at current PC 0xc7. Use Program memory view to see instruction code disassembly
- Program the flash memory of an 8051
- How to save an 8-bit bmp with Julia
- Algorithm of HDR viewer of GIMP, Photoshop or anything similiar
- Z80 Assembly for ZX Spectrum how to use a variable as PRINT AT coordinates
- 8bit Quantization: Prediction outputs uncorrelated to underlying model
- Porting from Santaka ZX Spectrum clone code to Z80 to compile a Santaka game - how to translate to this dialect?
- Why is my 8-bit counter stuck at 0 or 255?
- Is it possible to configure the UART Data frame packet in 8051?
- LHLD doesn't assign a value to register HL
- Maxim DOW CRC algorithm. Cannot re-create example in application note
- Test and Verification for Designed Softcore Chip
Related Questions in EFLAGS
- How to change UP (direction) flag in x86 assembly to 1?
- Are there any internal descriptions of the RFLAGS 32-63 bits?
- How to move the zero flag into a register in x86-64?
- In inline asm within C, on x86/x86-64, is the value of the direction flag guaranteed to be cld?
- Why eflags register need a PF flag to record even or odd ones in the data?
- Why does this subtraction in NASM not set the sign flag?
- In this X86 emulator, why is the overflow flag getting set when adding 0xFFFF to 0xFFFF?
- Conditions under which EFLAGS flags are set in x86/x64
- Why doesn't bitwise NOT affect the ZF bit or any other FLAGS?
- Why does the Zero Flag exist?
- Overflow flag set to 1 after ROL operation even though it should be undefined
- Problem in understanding the overflow flag (OF) as defined by the IMUL instruction
- Should Sign Bit be ON for -65535 decimal in Intel 8086 assembly language?
- What exactly does BitwiseXNOR mean?
- does single step interrupt(01H interrupt) clear TF flag after every instruction?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Thank you very much. "ADD AL, CL" work. I am not quite familiar with x86 ISA, because of 8bit 16bit 32bit 64bit and its compatibility. I try ADD instruction to see the flags changing all day long and could not get the satisfy answer until I see your post. X86 machine could not execute 8051 code. 8051 simulator is perform by my program including fetch-decode-execute. If I could use 8-bit x86 ISA, then the execution part of 8051 simulator could use native machine code. In fact, I am planing to simulate 8051 ALU by using verilog if x86 ISA could not support 8 bit operation.