歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Unix知識 >> Unix基礎知識 >> Unix新手入門(12)

Unix新手入門(12)

日期:2017/2/25 10:12:27   编辑:Unix基礎知識
10 編程
10.1 DEC  FORTRAN
F77 [option] filename [option]
源文件以.f,.for,.FOR結尾
目標文件以.o結尾
.F結束的文件必須先用C予處理程序處理
.r和.E解釋為ratfor或ef1源程序
被 cpp予處理過的源程序
.options
-o output 生成目標文件名
-v     生成l列表文件
-w1    列警告信息,包括未被使用的變量
-W
-cross-reference 列表中含交叉索引
-c     強制生成目標文件,而不生成或執行代碼
-d-lines 編譯第1列為D的行
-go  無符號信息
-g1 應跟蹤信息,行信息缺省
-g2或-g  應符號調試信息和跟蹤信息自設置 O。
-g3   應符號調試信息和跟蹤信息但調試信息不精確
-machine-code 在列表中顯示機器語言信息
-o0 無優化
-o1 局部優化
-o2 全局優化包含o1
-o3 附加全局優化包含o2
-o4或o包含內部行擴展包含o3
-o5 軟件管道優化
-om 連接後優化
-tune generic ︱host︱ev4︱ev5
改進針對本機或本cpu的性能,其它cpu下降
-show code 顯示機器代碼
-show include 顯示include文件中語句
-show nomap 無符號表示
-show xvef
-warn argument-checking
-warn declaretions
-warn noalignments
-worn nogenerl
-warn nouncalled
-warn nouninitialized
-warn nounreachable
-warn truncated-sourse
-warn unused
-convert cray
-convert IBM


予定義的別名
a assign f func
b stop at h history
bp stop in j status
d delete li &curpc/10I;&curpc=&curpc+40
l list
n next q quit
u: nexti r rerun
p print ri record input
pd printf “%d” ro recond ouput
po printf “%o” s step
pr printregs si stepi
ps printf “%s” u list &curline-9:10
px printf “ox%x” w list &curline-5:10
wi &curpc-20/10i W list &curline-10:20
what is  變量       delet all
where is   變量      file
which   變量      goto line
patch f00=20
patch f00=20       catch ignore信號
trace    at         set,useset
return            source 文件名
attach
dbxinit 文件,初始化命令,設置,
10.3 make ,makefile, Makefile s.makefile
例:persee:persee.for cudl:a.o l:b.o
f>>-c-g-i8-r8-dorble-size128-g\
-convert=cray persee.for cudl:u.0 l:b.0
cndl:u.o:cndl:u.for
f>>-c-g-i8-r8-double-size128-convert=cray\cndliu.for
l:b.o:lb.for
f>>-c-g-i8-r8-double-size128-convert=cray\l:b.for
make -b 兼容老版makefile
-d Debug 模式
-f makefile
l:b:l:b(file1.0)l:b(file2.0) l:b(file3.0)
.c.a:
&(cc)-c&(CFLAGS1)&<
ar rv $@ $*.0
rm-f $*.0
10.4 使用軟盤
? 軟盤文件系統
$ fddisk -fmt /dev/rfdoa
$ fddisk -fmt -f /dev /rfdoc
$ newfs /dev/fd0c rx23
$ mount /dev/fd0c /mnt
$ cp file /mnt
$ umont /mnt
? DOS格式軟盤
# ln –s /dev/rfd0c /dev/fddrive
$ /usr/bin/mtools/mdir
$ /usr/bin/mtools/mcopy file a:
? 原始格式
$ tar cvf /dev/rfd0a mydirs
11 UNIX藝術
對UNIX使用時間越長,對UNIX的了解就越深入,剛開始使用時,每天都有新的發現,二三年以後逐漸開成自己的風格。
使用UNIX是一種藝術享受,而不是攔路虎,通向藝術之路。
Copyright © Linux教程網 All Rights Reserved