OpenCores
URL https://opencores.org/ocsvn/eco32/eco32/trunk

Subversion Repositories eco32

[/] [eco32/] [trunk/] [fp/] [implementation/] [mmix/] [iotest1.mms] - Blame information for rev 108

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 15 hellwig
* TESTING I/O (besides what was tested by the copy program)
2
* (intended for online test)
3
 
4
t        IS   $255
5
Buf      IS   Data_Segment+2
6
         LOC  Buf+9*2
7
Arg0     OCTA Buf,9
8
Arg1     OCTA Filename,BinaryReadWrite
9
         LOC  @+1
10
Filename BYTE "iotest.tmp",0
11
         GREG Buf
12
 
13
         LOC  #200
14
Main     LDA  t,Arg0
15
         TRAP 0,Fgets,StdIn     Fgets(StdIn,Buf,9)
16
         LDA  t,Buf
17
         TRAP 0,Fputs,StdOut    Fputs(StdOut,Buf)
18
         LDA  t,Arg0
19
         TRAP 0,Fgetws,StdIn    Fgetws(StdIn,Buf,9)
20
         LDA  t,Buf
21
         TRAP 0,Fputws,StdOut   Fputws(StdOut,Buf)
22
         TRAP 0,Fclose,StdIn    Fclose(StdIn)
23
         TRAP 0,Fclose,StdIn    Fclose(StdIn)
24
         LDA  t,Arg1
25
         TRAP 0,Fopen,StdIn     Fopen(StdIn,"iotest.tmp",BinaryReadWrite)
26
         NEG  t,1
27
         TRAP 0,Fseek,StdIn     Fseek(StdIn,-1)
28
         TRAP 0,Ftell,StdIn     Ftell(StdIn)
29
         LDA  t,Buf
30
         TRAP 0,Fputws,StdIn    Fputws(StdIn,Buf)
31
         SET  t,2
32
         TRAP 0,Fseek,StdIn     Fseek(StdIn,2)
33
         LDA  t,Arg0
34
         TRAP 0,Fgets,StdIn     Fgets(StdIn,Buf,9)
35
         TRAP 0,Halt,0
36
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.