English 中文(简体)
• 如何为I32的ys确定缓冲
原标题:Howto define a buffer for IA32 sys_read call
  • 时间:2011-09-24 15:34:37
  •  标签:
  • x86

I m在使用玩具系统方面遇到麻烦,它从I32组件方案中呼吁采用关于含水层的系统。 如何确定缓冲?

这是我迄今所做工作的相关部分:

    movl $(SYS_read), %eax
    movl $(STDIN), %ebx   
    movl BUFFADDR, %ecx  
    movl 2, %edx
    int $0x80   
    movl $eax, $ebp // number of read bytes

where SYS_read and STDIN are defined at the beginning. Where is the correct place to set up the buffer? (BUFFADDR in the pasted code).

Are there any I/O libraries for IA32 Assembler? Or is that the easiest way to read a value from Stdin? I couldn t find a working example performing such an operation, I hope someone can help.

最佳回答

“BUFFADDR”只是一些记忆区域的地址,而这个区域足以读取数据(就你而言是两个字塔)。 你们基本上有两个地方可以从现在的脚步或跳跃那里获得记忆。 对于一个小的缓冲,你也许可以把 st子(把 st点推到保留某些空间)分配给肥皂,见彩板系统电话。

Here s some details about stack frames (includes stuff about argument passing that you don t need yet, though): http://www.cs.mun.ca/~rod/winter2004/cs3724/notes/frame.html

If you want IO libraries, then pretty much by definition you don t want assembler. The IO library you re looking for is the C library.

问题回答

暂无回答




相关问题
How can I do a CPU cache flush in x86 Windows?

I am interested in forcing a CPU cache flush in Windows (for benchmarking reasons, I want to emulate starting with no data in CPU cache), preferably a basic C implementation or Win32 call. Is there a ...

What are the names of the new X86_64 processors registers?

Where can I find the names of the new registers for assembly on this architecture? I am referring to registers in X86 like EAX, ESP, EBX, etc. But I d like them in 64bit. I don t think they are the ...

How do I disassemble raw 16-bit x86 machine code?

I d like to disassemble the MBR (first 512 bytes) of a bootable x86 disk that I have. I have copied the MBR to a file using dd if=/dev/my-device of=mbr bs=512 count=1 Any suggestions for a Linux ...

32bit application access to 64bit registry

I have an OS Shell written in 32bit that is replacing the Explorer.exe of a Vista machine. I run a utility which is also written in 32bit, which allows to switch between the Explorer shell and My ...

Left Shift Overflow on 68k/x86?

I heard that the Motorola 68000 and Intel x86 architectures handle overflow from left shifting differently. Specifically the 68k LSL vs. the Intel SAL/SHL assembly instructions. Does anyone know the ...

Translate a FOR to assembler

I need to translate what is commented within the method, to assembler. I have a roughly idea, but can t. Anyone can help me please? Is for an Intel x32 architecture: int secuencia ( int n, ...

热门标签