Re: Problems with FreeBSD assembly

2009-11-12 Thread Giorgos Keramidas
On Wed, 11 Nov 2009 14:43:21 -0500, David Jackson wrote: > I am having great difficulty running a very simple assembler program > on FreeBSD on x86 in my efforts to learn some assembly programming on > FreeBSD. I have tried to compile the following with nasm, however i > get nothing

Re: Problems with FreeBSD assembly

2009-11-12 Thread David Jackson
Charlie Kester wrote: On Wed 11 Nov 2009 at 17:32:41 PST Charlie Kester wrote: One more thing: Notice that the system call number (or any other dword) should also be pushed onto the stack before the int 80h. The reason for this is given at the top of the page: although the kernel is acce

Re: Problems with FreeBSD assembly

2009-11-12 Thread perryh
Mihai Don??u wrote: > I don't think the kernel is the one that initializes the > 0, 1 and 2 file descriptors (stdin, stdout and stderr). Correct so far. > I think you have to open them yourself ... No, the shell does it. That's how it is able to set up pipes and redirection. __

Re: Problems with FreeBSD assembly

2009-11-11 Thread Charlie Kester
On Wed 11 Nov 2009 at 17:32:41 PST Charlie Kester wrote: One more thing: Notice that the system call number (or any other dword) should also be pushed onto the stack before the int 80h. The reason for this is given at the top of the page: although the kernel is accessed using int 80h, it

Re: Problems with FreeBSD assembly

2009-11-11 Thread Charlie Kester
On Wed 11 Nov 2009 at 11:43:21 PST David Jackson wrote: I am having great difficulty running a very simple assembler program on FreeBSD on x86 in my efforts to learn some assembly programming on FreeBSD. I have tried to compile the following with nasm, however i get nothing in response when I

Re: Problems with FreeBSD assembly

2009-11-11 Thread Mihai Donțu
On Wednesday 11 November 2009 21:43:21 David Jackson wrote: > I am having great difficulty running a very simple assembler program on > FreeBSD on x86 in my efforts to learn some assembly programming on > FreeBSD. I have tried to compile the following with nasm, however i get >

Problems with freebsd assembly

2009-11-11 Thread David Jackson
I am having great difficulty running a very simple assembler program on FreeBSD on x86 in my efforts to learn some assembly programming on FreeBSD. I have tried to compile the following with nasm, however i get nothing in response when I attempt to run this program: section .data

Problems with FreeBSD assembly

2009-11-11 Thread David Jackson
I am having great difficulty running a very simple assembler program on FreeBSD on x86 in my efforts to learn some assembly programming on FreeBSD. I have tried to compile the following with nasm, however i get nothing in response when I attempt to run this program: section .data

Re: Inline assembly under FreeBSD

2008-04-07 Thread Unga
--- Ivan Voras <[EMAIL PROTECTED]> wrote: > Wojciech Puchar wrote: > >> asm("pushfl; stc; int $0x13; setc %%al; > popfl" > >> : "+a" (ax), "+b" (bx), "=c" (cx), "+d" > (dx) > >> : : "esi", "edi"); > >> > >> if ((u8)ax) > >> return -1;/* No extended information

Re: Inline assembly under FreeBSD

2008-04-07 Thread Ivan Voras
Wojciech Puchar wrote: >> asm("pushfl; stc; int $0x13; setc %%al; popfl" >> : "+a" (ax), "+b" (bx), "=c" (cx), "+d" (dx) >> : : "esi", "edi"); >> >> if ((u8)ax) >> return -1;/* No extended information */ >> else >> return 1;/* Extended information

Re: Inline assembly under FreeBSD

2008-04-07 Thread Wojciech Puchar
asm("pushfl; stc; int $0x13; setc %%al; popfl" : "+a" (ax), "+b" (bx), "=c" (cx), "+d" (dx) : : "esi", "edi"); if ((u8)ax) return -1; /* No extended information */ else return 1; /* Extended information ava

Inline assembly under FreeBSD

2008-04-07 Thread Unga
Hi all I'm trying to execute following inline assembly code in a C function under FreeBSD 7.0: typedef unsigned char u8; typedef unsigned short u16; u8 devno= 0x80; static int check_extensions(u8 devno) { u16 ax, bx, cx, dx, di; ax = 0x4100; bx = 0x55AA;

RE: Need help with GNU assembly

2007-06-17 Thread Ted Mittelstaedt
http://asm.sourceforge.net/intro.html > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Patil, Kiran > Sent: Thursday, June 14, 2007 2:11 PM > To: freebsd-questions@freebsd.org > Cc: Patil, Kiran > Subject: Need help with GNU as

RE: Need help with GNU assembly

2007-06-17 Thread Ted Mittelstaedt
http://user.nj.net/~tms/hello.html > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Patil, Kiran > Sent: Thursday, June 14, 2007 2:11 PM > To: freebsd-questions@freebsd.org > Cc: Patil, Kiran > Subject: Need help with GNU as

Need help with GNU assembly

2007-06-14 Thread Patil, Kiran
Hi All, I am trying to use GNU assembly. I am trying simple thing such as , moving content of memory location into general purpose register (ax). I have following code : struct context { unsigned long mask[8]; } CONTEXT; int main() { CONTEXT sr

Re: Assembly language on FreeBSD

2007-02-08 Thread Ted Mittelstaedt
openssl also uses assembler in some of it's files Ted - Original Message - From: "Daniel Molina Wegener" <[EMAIL PROTECTED]> To: Cc: "Rico Secada" <[EMAIL PROTECTED]> Sent: Wednesday, February 07, 2007 3:07 PM Subject: Re: Assembly language on Free

Re: Assembly language on FreeBSD

2007-02-07 Thread Daniel Molina Wegener
On Wednesday 07 February 2007 19:45, Rico Secada wrote: > Hi > > I am brushing up on my assembler language and I wonder if > anyone could recommend any particular reading well suited for > FreeBSD? Try looking as(1) manual page, the gas info page (info gas) and looking on the internet for guides

Re: Assembly language on FreeBSD

2007-02-07 Thread Tore Lund
Rico Secada wrote: > Hi > > I am brushing up on my assembler language and I wonder if anyone could > recommend any particular reading well suited for FreeBSD? http://www.int80h.org/bsdasm/ -- Tore ___ freebsd-questions@freebsd.org mailing list h

Assembly language on FreeBSD

2007-02-07 Thread Rico Secada
Hi I am brushing up on my assembler language and I wonder if anyone could recommend any particular reading well suited for FreeBSD? Best and kind regards, Rico Secada. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/list

Re: Hardware assembly

2005-01-15 Thread John
On Sun, Jan 16, 2005 at 03:28:18AM +, Street Chaman wrote: > hi everyone, > > i need low level hardware control over some devices (kbd, sound, display) in > an assembly soft, and 'd like to know where i can find a list of > ioctl_syscall supported parameters for each d

Hardware assembly

2005-01-15 Thread Street Chaman
hi everyone, i need low level hardware control over some devices (kbd, sound, display) in an assembly soft, and 'd like to know where i can find a list of ioctl_syscall supported parameters for each device. Furthermore, if someone knows some good (more complete than developpers-handbook

Re: Strange behaviour in assembly language program

2004-03-03 Thread jan . muenther
> > pusheax ; Or any other dword Heh... that of course will work too ;) ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Strange behaviour in assembly language program

2004-03-03 Thread Daniela
sts me too much space. The only one I know of, > > is PUSHA, but it pushes too many bytes. > > Quoting from dev-handbook: > > But assembly language programmers like to shave off cycles. The above > > example requires a call/ret combination. We can eliminate it by > &g

Re: Strange behaviour in assembly language program

2004-03-03 Thread Sergey 'DoubleF' Zaharchenko
om dev-handbook: > But assembly language programmers like to shave off cycles. The above > example requires a call/ret combination. We can eliminate it by > pushing an extra dword: > > open: > pushdword mode > pushdword flags > pushdword path >

Re: Strange behaviour in assembly language program

2004-03-02 Thread Daniela
On Tuesday 02 March 2004 21:19, [EMAIL PROTECTED] wrote: > Howdy, > > > Here it is: > > > > .text > > .global _start > > _start: > > pushl $0 > > movl$1, %eax > > int $0x80 > > > > I looked everywhere (Developer's handbook, Google, ...) to find the > > solution, but all resour

Re: Strange behaviour in assembly language program

2004-03-02 Thread jan . muenther
Howdy, > Here it is: > > .text > .global _start > _start: > pushl $0 > movl$1, %eax > int $0x80 > > I looked everywhere (Developer's handbook, Google, ...) to find the solution, > but all resources I consulted tell me this is the right way to do it. > This program, h

Strange behaviour in assembly language program

2004-03-02 Thread Daniela
Hi! I'm already a bit experienced with assembly, and started to enter my executables directly in the hexeditor (for educational purpose only; I know this is poor programming style). I do not yet fully understand all aspects of the ELF header, but I managed to somehow write workin

i386 assembly language question

2004-01-19 Thread Rostislav Krasny
I thought that I found a typo in the arch-handbook and I wrote about that to the freebsd-doc mailing list. You can read that email at http://docs.freebsd.org/cgi/mid.cgi?20040117005106.21558.qmail I didn't get any response yet. Maybe I'm missing something and this isn't a typo? What is "posh" instr

Assembly

2002-11-15 Thread dslb
Hi all Just have some assembly questions. Why do BSD pass arguments via the stack and not the registres like Linux and windows? Is there a list of what (system) calls are in the kernel and what their numbers are? How do I call a function I have written my self (in C++)? Hope someone can/will