www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/06/10:14:16

From: "Anthony.Appleyard" <MCLSSAA2 AT fs2 DOT mt DOT umist DOT ac DOT uk>
Organization: Materials Science Centre
To: DJGPP AT delorie DOT com
Date: Tue, 6 Jan 1998 15:07:46 GMT
Subject: Operations on conventional memory
Reply-to: Anthony DOT Appleyard AT umist DOT ac DOT uk
Message-ID: <1B6D42C6A39@fs2.mt.umist.ac.uk>

  farpokeb is defined as:-

extern __inline__ void farpokeb(unsigned short selector,
         unsigned long offset, unsigned char value) {
  __asm__ __volatile__ ("movw %w0,%%gs\n" " .byte 0x65 \n" " movb %b1,(%k2)"
      : : "g" (selector), "qi" (value), "r" (offset)); }

  and its relatives similarly. Which PC instructions can I prefix `byte 0x65'
to to make them operate on conventional memory? If e.g. I wanted a quick way
to compile `x &= y', where x is in conventional memory, would this work?:-

extern __inline__ void farpokeandb(unsigned short selector,
         unsigned long offset, unsigned char value) {
  __asm__ __volatile__ ("movw %w0,%%gs\n" " .byte 0x65 \n" " andb %b1,(%k2)"
      : : "g" (selector), "qi" (value), "r" (offset)); }

- Raw text -


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