delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/08/09/11:29:57

Date: Mon, 9 Aug 93 09:49:11 -0400
From: DJ Delorie <dj AT ctron DOT com>
To: akrause AT saturn DOT sdsu DOT edu
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re:

> ; setgmode(int mode)
> ;       Set VGA adapter to BIOS mode MODE

> _setgmode proc far
>         ARG     mode:WORD 
>         push    bp
>         mov     bp,sp
>         move    ax,mode
>         mov     ah,0
>         int     10h
>         pop     bp
>         ret
> _setgmode endp

	.text
	.globl	_setgmode
_setgmode:
	pushl	%ebp
	movl	%esp,%ebp
	movb	8(%ebp),%al
	movb	$0,%ah
	int	$0x10
	popl	%ebp
	ret

(no guarantees)

>   So, how do I 'transloate' this into a form which gcc/as will recognize>>??

Get the two gas documents from the djgpp area for more information.

> Is the proper suffix for my filename a .s or .asm??  And, how do I compile it
> into an object (and therefore linkable) file??

	gcc -c setgmode.s

If you need to pass it through CPP first, use ".S" instead of ".s".

DJ


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019