All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maciej Hrebien <m_hrebien@wp.pl>
To: linux-assembly@vger.kernel.org
Subject: Re: changing system time - 'struct' implementation in asm
Date: Wed, 06 Aug 2003 09:53:12 +0200	[thread overview]
Message-ID: <3F30B3E8.E9D401C9@wp.pl> (raw)
In-Reply-To: 20030806014904.406.qmail@web11409.mail.yahoo.com

Slack Traq wrote:
> 
> How do you make a struct in assembly????

<gas in .data or .bss>

timv: .long 0  # tv_sec
      .long 0  # tv_usec

<gas locally on stack>

# ...

pushl $0  # tv_usec
pushl $0  # tv_sec

# ...

$timv or %esp points to your timeval struct. If you want timv to be not
local, write .globl/.global timv.

-- 
Maciej Hrebien


      reply	other threads:[~2003-08-06  7:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-05  1:28 changing system time Joshua Hudson
2003-08-05  7:51 ` Maciej Hrebien
2003-08-06  1:49   ` changing system time - 'struct' implementation in asm Slack Traq
2003-08-06  7:53     ` Maciej Hrebien [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F30B3E8.E9D401C9@wp.pl \
    --to=m_hrebien@wp.pl \
    --cc=linux-assembly@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.