Quote (AbDuCt @ Nov 19 2012 04:49pm)
yea but say for instance in x86 32bit asm on linux you also have to supply a buffer to store the stdin data, the length of the buffer and other details before the interrupt call.
Code
.section .bss
.equ buffer_size, 500
.lcomm buffer, buffer_size
.section .text
.global _start
_start:
movl $0, %ebx
movl $buffer, %ecx
movl $buffer_size, %edx
movl $3, %eax
int $0x80
not sure how 8086 works though never used it
oh ok, u were talking about the stack size ?
In 8086 it's this kind of skeleton :
Code
PILE SEGMENT STACK
DW 256 DUP(?)
Base:
PILE ENDS
DATA SEGMENT
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE, DS:DATA, SS :PILE
main: MOV AX,DATA
MOV DS,AX
MOV AX,PILE
MOV SS,AX
MOV SP,Base
MOV AH,4CH
INT 21H
CODE ENDS