"Fossies" - the Fresh Open Source Software Archive

Member "dosemu-1.4.0/src/commands/speed.S" (4 May 2007, 935 Bytes) of package /linux/misc/old/dosemu-1.4.0.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PowerPC Assembler source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # 
    2 # (C) Copyright 1992, ..., 2007 the "DOSEMU-Development-Team".
    3 #
    4 # for details see file COPYING.DOSEMU in the DOSEMU distribution
    5 #
    6 
    7 
    8 # speed.S, to generate speed.com, for dosemu 0.67.16, 97/11/22
    9 # Set/Get HogThreshold
   10 #                                            Hans Lermen@fgan.de
   11 #
   12 
   13 .text
   14 .code16
   15     .globl  _start16
   16 _start16:
   17 
   18 #define NEED_ARGV
   19 #include "detect.h"
   20 
   21     cmp $1,argc
   22     je  ok_set
   23     jb  ok_get
   24 abort:
   25     lea abortmsg,%si
   26     call    print_and_exit
   27 abortmsg:
   28     .ascii  "USAGE: speed [hogthreshold]"
   29 linefeed:
   30     .byte   13,10,0
   31 resultmsg:
   32     .ascii  "Current hogthreshold value = "
   33     .byte   0
   34 
   35 ok_set:
   36     movw    argv,%si
   37     call    atoi
   38     cmpw    $255,%ax
   39     ja  abort
   40     movw    %ax,%bx
   41     movw    $0x12,%ax   # set HogThreshold
   42     int $0xe6       # doshelper
   43 ok_get:
   44     lea resultmsg,%si
   45     call    print
   46     movw    $0x28,%ax   # get HogThreshold
   47     movw    $1,%bx      # bx=1 for Get Hogthreshold
   48     int $0xe6       # doshelper
   49     call    printdecimal
   50     lea linefeed,%si
   51     call    print
   52     movb    $0,%al
   53     call    exit
   54 
   55 
   56