~ubuntu-branches/ubuntu/quantal/gclcvs/quantal

« back to all changes in this revision

Viewing changes to dos/read.s

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2004-06-24 15:13:46 UTC
  • Revision ID: james.westby@ubuntu.com-20040624151346-xh0xaaktyyp7aorc
Tags: 2.7.0-26
C_GC_OFFSET is 2 on m68k-linux

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This is file READ.S */
 
2
/*
 
3
** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
 
4
**
 
5
** This file is distributed under the terms listed in the document
 
6
** "copying.dj", available from DJ Delorie at the address above.
 
7
** A copy of "copying.dj" should accompany this file; if not, a copy
 
8
** should be available from where this file was obtained.  This file
 
9
** may not be distributed without a verbatim copy of "copying.dj".
 
10
**
 
11
** This file is distributed WITHOUT ANY WARRANTY; without even the implied
 
12
** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
13
*/
 
14
 
 
15
        .text
 
16
        .globl _read
 
17
_read:
 
18
        pushl   %eax
 
19
        movl    $0,%eax
 
20
        cmp     8(%esp),%eax    /* Is it stdin */
 
21
        jne     NotStdin
 
22
        cmp     _interrupt_flag,%eax /* Any SIGINT Interrupt pending ? */
 
23
        je      NoInterrupt
 
24
        call    _sigalrm
 
25
NoInterrupt:
 
26
NotStdin:
 
27
        popl    %eax
 
28
 
 
29
        pushl   %ebx
 
30
        pushl   %esi
 
31
        pushl   %edi
 
32
        movl    16(%esp),%ebx
 
33
        movl    20(%esp),%edx
 
34
        movl    24(%esp),%ecx
 
35
        movb    $0x3f,%ah
 
36
        int     $0x21
 
37
        popl    %edi
 
38
        popl    %esi
 
39
        popl    %ebx
 
40
        jb      syscall_error
 
41
        ret