posts - 18,  comments - 1,  trackbacks - 0
   1:  # author : See-See
   2:  #    text segment
   3:      .text       
   4:      .globl main
   5:  main:                  # execution starts here
   6:      la $a0,str         # put string address into a0
   7:      li $v0,4         # system call to print
   8:      syscall             # out a string
   9:      li $v0,10
  10:      syscall             # exit
  11:  #data segment
  12:      .data
  13:  str:    .asciiz "hello world\n"
   1:  # author : lijian
   2:  # date: 2012-01-04 21:00:30
   3:  # function: use mips output 
   4:   
   5:       .data
   6:  # variable declarations here
   7:  msg:     .asciiz          "\nthis is a message to show!\n"  #declared for string
   8:  inter:     .word          168                                        #declared a interger 
   9:  char:     .byte          'a'                                        #declared a character
  10:   
  11:   
  12:       .text
  13:  main:                      # indicates start of code
  14:   
  15:  # show interger
  16:       li     $v0, 1                    # $v0 <= 1
  17:       lw     $a0, inter               # $a0 <= inter
  18:       syscall
  19:  # show string
  20:       li     $v0, 4                    # $v0 <= 4
  21:       la     $a0, msg               # $a0 <= msg
  22:       syscall
  23:   
  24:       li     $v0, 10                    #system call code for exit = 10
  25:       syscall                         #call operating system to exit
   1:  # author : lijian
   2:  # date: 2012-01-04 21:35:31
   3:  # function: use mips input 
   4:   
   5:       .data
   6:  # variable declarations here
   7:  msg:     .space 40           #allocate 40 consecutive bytes,
   8:  msg1:     .asciiz          "\ninput a integer: "  # declared for string
   9:  msg2:     .asciiz          "\ninput a string: "   # declared for string
  10:  msg3:     .asciiz          "\nyou input: "             # declared for string
  11:       .text
  12:  main:                      # indicates start of code
  13:   
  14:  # input integer
  15:       li     $v0, 4
  16:       la     $a0, msg1
  17:       syscall
  18:       li     $v0, 5                    #read integer
  19:       syscall
  20:       move     $a1, $v0
  21:       li     $v0, 4
  22:       la     $a0, msg3
  23:       syscall
  24:       li     $v0, 1
  25:       move     $a0, $a1
  26:       syscall
  27:       
  28:       li     $v0, 4
  29:       la     $a0, msg2
  30:       syscall
  31:       li     $v0, 8
  32:       la     $a0, msg
  33:       li     $a1, 40
  34:       syscall
  35:       
  36:       li     $v0, 4
  37:       la     $a0, msg
  38:       syscall
  39:       
  40:       li     $v0, 10                    #system call code for exit = 10
  41:       syscall                         #call operating system to exit

4

   1:  # author : lijian
   2:  # date: 2012-01-04 22:09:55
   3:  # fuction: use mips to count
   4:   
   5:       .data
   6:  newline:     .asciiz          "\n"
   7:  line:          .asciiz          "****************************\n"
   8:  head:          .asciiz          "        count numbers       \n"
   9:  author:          .asciiz          "         author : lijian    \n"
  10:  version:     .asciiz          "       version: 0.1         \n"
  11:  first:          .asciiz          "input the first num: "
  12:  second:          .asciiz          "input the second num: "
  13:  addString:     .asciiz          " + "
  14:  subString:     .asciiz          " - "
  15:  mulString:     .asciiz          " * "
  16:  divString:     .asciiz          " / "
  17:  equalString: .asciiz     " = "
  18:   
  19:       .text
  20:  main:
  21:  # show menu
  22:       li     $v0, 4
  23:       la     $a0, line
  24:       syscall
  25:       li     $v0, 4
  26:       la     $a0, head
  27:       syscall
  28:       li     $v0, 4
  29:       la     $a0, newline
  30:       syscall
  31:       li     $v0, 4
  32:       la     $a0, author
  33:       syscall
  34:       li     $v0, 4
  35:       la     $a0, version
  36:       syscall
  37:       li     $v0, 4
  38:       la     $a0, line
  39:  # input first num
  40:       syscall
  41:       li     $v0, 4
  42:       la     $a0, first
  43:       syscall
  44:       li     $v0, 5
  45:       syscall
  46:       move     $s0, $v0
  47:  # input second num
  48:       li     $v0, 4
  49:       la     $a0, second
  50:       syscall
  51:       li     $v0, 5
  52:       syscall
  53:       move     $s1, $v0
  54:  # show add result
  55:       li     $v0, 1
  56:       move     $a0, $s0
  57:       syscall
  58:       li     $v0, 4
  59:       la     $a0, addString
  60:       syscall
  61:       li     $v0, 1
  62:       move     $a0, $s1
  63:       syscall
  64:       li     $v0, 4
  65:       la     $a0, equalString
  66:       syscall
  67:       
  68:       add $a0, $s0, $s1
  69:       li     $v0, 1
  70:       syscall
  71:       li     $v0, 4
  72:       la     $a0, newline
  73:       syscall
  74:       
  75:  # show sub result
  76:       li     $v0, 1
  77:       move     $a0, $s0
  78:       syscall
  79:       li     $v0, 4
  80:       la     $a0, subString
  81:       syscall
  82:       li     $v0, 1
  83:       move     $a0, $s1
  84:       syscall
  85:       li     $v0, 4
  86:       la     $a0, equalString
  87:       syscall
  88:       
  89:       sub $a0, $s0, $s1
  90:       li     $v0, 1
  91:       syscall
  92:       li     $v0, 4
  93:       la     $a0, newline
  94:       syscall
  95:       
  96:  # show mul result
  97:       li     $v0, 1
  98:       move     $a0, $s0
  99:       syscall
 100:       li     $v0, 4
 101:       la     $a0, mulString
 102:       syscall
 103:       li     $v0, 1
 104:       move     $a0, $s1
 105:       syscall
 106:       li     $v0, 4
 107:       la     $a0, equalString
 108:       syscall
 109:       
 110:       mul $a0, $s0, $s1
 111:       li     $v0, 1
 112:       syscall
 113:       li     $v0, 4
 114:       la     $a0, newline
 115:       syscall
 116:   
 117:  # show div result
 118:       li     $v0, 1
 119:       move     $a0, $s0
 120:       syscall
 121:       li     $v0, 4
 122:       la     $a0, divString
 123:       syscall
 124:       li     $v0, 1
 125:       move     $a0, $s1
 126:       syscall
 127:       li     $v0, 4
 128:       la     $a0, equalString
 129:       syscall
 130:       
 131:       div $a0, $s0, $s1
 132:       li     $v0, 1
 133:       syscall
 134:       li     $v0, 4
 135:       la     $a0, newline
 136:       syscall
 137:       
 138:       li     $v0, 10                    #system call code for exit = 10
 139:       syscall                         #call operating system to exit

5

   1:  # author : lijian
   2:  # data: 2012-01-04 22:38:01
   3:  # function: find the max num and count the total
   4:   
   5:       .data
   6:  array:          .space     12          #allocate 12 consecutive bytes
   7:  msg1:          .asciiz          "input the 3 integers(each num end of [enter]): \n"
   8:  msg2:          .asciiz          "the max num is: "
   9:  msg3:          .asciiz          "the tatal is: "
  10:  newline:     .asciiz          "\n"
  11:   
  12:       .text
  13:  main:
  14:   
  15:       la     $t0, array
  16:       li     $v0, 4
  17:       la     $a0, msg1
  18:       syscall
  19:       li     $v0, 5 
  20:       syscall
  21:       sw     $v0,($t0) # store the first num
  22:       li     $v0, 5
  23:       syscall
  24:       sw     $v0,4($t0) # stroe the second num
  25:       li     $v0, 5
  26:       syscall
  27:       sw     $v0,8($t0)  # store the third num
  28:   
  29:       lw     $s0, ($t0)  # get the first num
  30:       lw     $s1, 4($t0) # get the second num
  31:       lw     $s2, 8($t0) # get the third num
  32:       
  33:       add $s3, $s0, $s1
  34:       add $s4, $s2, $s3  # total stored in $s4
  35:       li     $v0, 4
  36:       la     $a0, msg3
  37:       syscall
  38:       li     $v0, 1
  39:       move     $a0, $s4
  40:       syscall
  41:       li     $v0, 4
  42:       la     $a0, newline
  43:       syscall
  44:       
  45:       blt     $s0, $s1,num2
  46:       move $s3, $s0
  47:       j     num3
  48:  num2:
  49:       move $s3, $s1
  50:  num3:
  51:       bge     $s3, $s2, num4
  52:       move $s3, $s2
  53:  num4:
  54:       li     $v0, 4
  55:       la     $a0, msg2
  56:       syscall
  57:       li     $v0, 1
  58:       move     $a0, $s3
  59:       syscall
  60:       li     $v0, 4
  61:       la     $a0, newline
  62:       syscall
  63:       
  64:       li     $v0, 10                    #system call code for exit = 10
  65:       syscall                         #call operating system to exit

6

posted @ 2012-01-04 23:33 hustlijian 阅读(277) 评论(0) 编辑

windows7 shell 就是windows7操作系统的的控制台。对于熟悉了命令行的人而言,用键盘调用程序比鼠标更快更省力,您可以用"Shell:"命令调用一切可以用资源管理器打开的项目甚至是一次完成.需要很多步骤才能完成的任务。

    以下列出所有Shell的列表:

Windows 7 Only
shell:Libraries
shell:MusicLibrary
shell:VideosLibrary
shell:OtherUsersFolder
shell:Device Metadata Store
shell:PublicSuggestedLocations
shell:DocumentsLibrary
shell:User Pinned
shell:UsersLibrariesFolder
shell:PicturesLibrary
shell:ImplicitAppShortcuts
shell:Ringtones
shell:CommonRingtones

Windows Vista & 7
shell:Common Programs
shell:GameTasks
shell:UserProfiles
shell:MyComputerFolder
shell:SyncSetupFolder
shell:DpapiKeys
shell:SamplePlaylists
shell:Favorites
shell:My Video
shell:SearchHomeFolder
shell:System
shell:CommonVideo
shell:SyncResultsFolder
shell:LocalizedResourcesDir
shell:Cookies
shell:Original Images
shell:CommonMusic
shell:My Pictures
shell:Cache
shell:Downloads
shell:CommonDownloads
shell:AppData
shell:SyncCenterFolder
shell:My Music
shell:ConflictFolder
shell:SavedGames
shell:InternetFolder
shell:Quick Launch
shell:SystemCertificates
shell:Contacts
shell:TreePropertiesFolder
shell:Profile
shell:Start Menu
shell:Common AppData
shell:PhotoAlbums
shell:ConnectionsFolder
shell:Administrative Tools
shell:PrintersFolder
shell:Default Gadgets
shell:ProgramFilesX86
shell:Searches
shell:Common Startup
shell:ControlPanelFolder
shell:SampleVideos
shell:SendTo
shell:ResourceDir
shell:ProgramFiles
shell:CredentialManager
shell:PrintHood
shell:MAPIFolder
shell:CD Burning
shell:AppUpdatesFolder
shell:Common Start Menu
shell:LocalAppDataLow
shell:Templates
shell:Gadgets
shell:Programs
shell:Recent
shell:SampleMusic
shell:Desktop
shell:CommonPictures
shell:RecycleBinFolder
shell:CryptoKeys
shell:Common Templates
shell:Startup
shell:Links
shell:OEM Links
shell:SamplePictures
shell:Common Desktop
shell:NetHood
shell:Games
shell:Common Administrative Tools
shell:NetworkPlacesFolder
shell:SystemX86
shell:History
shell:AddNewProgramsFolder
shell:Playlists
shell:ProgramFilesCommonX86
shell:PublicGameTasks
shell:ChangeRemoveProgramsFolder
shell:Public
shell:Common Documents
shell:CSCFolder
shell:Local AppData
shell:Windows
shell:UsersFilesFolder
shell:ProgramFilesCommon
shell:Fonts
shell:Personal

posted @ 2011-12-23 13:13 hustlijian 阅读(20) 评论(0) 编辑

在网上找了不少东西,有的就是贴了个repo的文件,还是自己整理下,软件源设置好了,才可以快速的安装软件呀!

  1. 首先介绍一下CentOS的repo文件的结构:
    [base]
    name=CentOS-$releasever - Base
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
    #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

    【base】:代表容器的名字,中括号一定要存在,里面的名字可以任取,不可重名;
     name:说明一下这个容器的意义,不是很重要;
    mirrorlist=: 列出这个容器可以使用的镜像站点,如果不想使用,可以注释掉(默认用'#');
    baseurs=: 这个很重要,后面接的是容器的实际网址,mirrorlist是由yum程序自行去找镜像站点,baseurl则是指定固定的一个容器网址,我们要添加的网址就在这里;
    gpgcheck=: 这个是RPM的数字证书了,指定对应安装文件的数字证书,也就是类似于电驴的校验码了,和每个文件的大小内容有关的签证,可以用来验证文件是否更改,下载是否成功等,有了这个你就不怕你安装的东西是骇客植入了病毒的文件了。
    gpgkey=: 这个是数字证书的公钥文件所在的位置。
  2. 现在根据我们的国情(china)设置我们的文件,我们用的比较多的就是中科大的源

    http://centos.ustc.edu.cn/centos/
    (教育网爽了),163
    http://mirrors.163.com/centos/
    中国移动
    http://mirrors.ta139.com/centos

     

  3. 修改repo文件,总结来说就是注释mirrorlist,添加baseurl,如下是我的:

     1 [base]
     2 name=CentOS-$releasever - Base
     3 #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
     4 #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
     5 baseurl=http://centos.ustc.edu.cn/centos/$releasever/contrib/$basearch/
     6 http://mirrors.163.com/centos/$releasever/contrib/$basearch/
     7 http://mirrors.ta139.com/centos/$releasever/contrib/$basearch/
     8 http://mirror.neu.edu.cn/centos/$releasever/contrib/$basearch/
     9 gpgcheck=1
    10 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
    11 
    12 #released updates
    13 [updates]
    14 name=CentOS-$releasever - Updates
    15 #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
    16 #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
    17 baseurl=http://centos.ustc.edu.cn/centos/$releasever/contrib/$basearch/
    18 http://mirrors.163.com/centos/$releasever/contrib/$basearch/
    19 http://mirrors.ta139.com/centos/$releasever/contrib/$basearch/
    20 http://mirror.neu.edu.cn/centos/$releasever/contrib/$basearch/
    21 gpgcheck=1
    22 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
    23 
    24 #additional packages that may be useful
    25 [extras]
    26 name=CentOS-$releasever - Extras
    27 #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
    28 #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
    29 baseurl=http://centos.ustc.edu.cn/centos/$releasever/contrib/$basearch/
    30 http://mirrors.163.com/centos/$releasever/contrib/$basearch/
    31 http://mirrors.ta139.com/centos/$releasever/contrib/$basearch/
    32 http://mirror.neu.edu.cn/centos/$releasever/contrib/$basearch/
    33 gpgcheck=1
    34 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
    35 
    36 #additional packages that extend functionality of existing packages
    37 [centosplus]
    38 name=CentOS-$releasever - Plus
    39 #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
    40 #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
    41 baseurl=http://centos.ustc.edu.cn/centos/$releasever/contrib/$basearch/
    42 http://mirrors.163.com/centos/$releasever/contrib/$basearch/
    43 http://mirrors.ta139.com/centos/$releasever/contrib/$basearch/
    44 http://mirror.neu.edu.cn/centos/$releasever/contrib/$basearch/
    45 gpgcheck=1
    46 enabled=0
    47 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
    48 
    49 #contrib - packages by Centos Users
    50 [contrib]
    51 name=CentOS-$releasever - Contrib
    52 #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
    53 #baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
    54 baseurl=http://centos.ustc.edu.cn/centos/$releasever/contrib/$basearch/
    55 http://mirrors.163.com/centos/$releasever/contrib/$basearch/
    56 http://mirrors.ta139.com/centos/$releasever/contrib/$basearch/
    57 http://mirror.neu.edu.cn/centos/$releasever/contrib/$basearch/
    58 gpgcheck=1
    59 enabled=0
    60 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
  4. 测试一下:
    yum repolist all    #列出现在yum server所使用的容器有哪些

    1 [root@localhost yum.repos.d]# yum repolist all
     2 Loaded plugins: fastestmirror, refresh-packagekit
     3 Loading mirror speeds from cached hostfile
     4 base                                                     |  951 B     00:00     
     5 base/primary                                             |  201 B     00:00     
     6 extras                                                   |  951 B     00:00     
     7 Not using downloaded repomd.xml because it is older than what we have:
     8   Current   : Mon Sep 26 21:11:35 2011
     9   Downloaded: Sun Jul 10 21:28:07 2011
    10 updates                                                  |  951 B     00:00     
    11 updates/primary                                          |  201 B     00:00     
    12 repo id                       repo name                               status
    13 base                          CentOS-6 - Base                         enabled: 0
    14 c6-media                      CentOS-6 - Media                        disabled
    15 centosplus                    CentOS-6 - Plus                         disabled
    16 contrib                       CentOS-6 - Contrib                      disabled
    17 debug                         CentOS-6 - Debuginfo                    disabled
    18 extras                        CentOS-6 - Extras                       enabled: 1
    19 updates                       CentOS-6 - Updates                      enabled: 0
    20 repolist: 1
  5. 如果有问题可以使用清除功能:
    yum clean all  #所有容器的数据删除

  6. 更新一下全系统:
    yum -y update #系统整体升级

  7. 查看所有的内核
    rpm -q kernel  #查询存在的内核版本

  8. 删除新的内核(应该要重启进入新的内核版本再删吧,呵呵,没有试过当前版本删除!)
    rpm -e  kernel-2.6.32-71.29.1.el6.i686 #删除你查询到的旧内核,复制粘贴就比较方便了!


     

posted @ 2011-11-01 21:06 hustlijian 阅读(114) 评论(0) 编辑
摘要: 提高效率的一些IT技巧阅读全文
posted @ 2011-09-11 14:06 hustlijian 阅读(103) 评论(0) 编辑

插件是个好东西,可以让我们给应用程序扩展功能,很多插件的安装也比较简单,而且可以有插件扩展的程序,功能才可以更加完善。

安装的方法有一些,比如可以在程序中选择相应的功能选项,或者直接下载相应的文件放到对应的文件。如foobar的插件就可以在官网:http://www.foobar2000.org/components/index.html,然后把*.dll文件放到安装目录下的comments文件夹下,重启就可以了。

posted @ 2011-08-14 13:38 hustlijian 阅读(173) 评论(0) 编辑
摘要: 文件扩展名2011年7月24日 星期日16:08文件后缀名:8+3格式,8个字节,文件名,3个字节后缀名文件扩展名维基百科,自由的百科全书副檔名(Filename Extension,或作延伸檔名)是早期操作系统(如VMS/CP/M/DOS等)用来标志文件格式的一种机制。以DOS来说,一个副檔名是跟在主檔名后面的,由一个分隔符号分隔。在一个像“example.txt”的檔名中,example是主檔名,txt为副檔名,表示这个文件是一个純文字文件,“.”就是主檔名与副檔名的分隔符号。DOS作業系统(包括Windows 3.x)把副檔名限制在3个字符以内。在其他Windows作業系統上,無論是16阅读全文
posted @ 2011-07-31 02:32 hustlijian 阅读(530) 评论(1) 编辑
摘要: 80x86中断向量 I/O地址 中断类型(中断号) 功能 0~3 0 除法溢出中断 4~7 1 单步 8~B 2 非屏蔽中断(NMI) C~F 3 断点中断 10~13 4 溢出中断 14~17 5 打印屏幕 18~1F 6、7 保留 8259中断向量 20~23 8 定时器(IRQ0) 24~27 9 键盘(IRQ1) 28~2B A 彩色/图形(IRQ2) 2C~2F B 串行通信COM2(IRQ3) 30~33 C 串行通信COM1(IRQ4) 34~37 D LPT2控制中断(IRQ5) 38~3B E 磁盘控制中断(IRQ6) 3C~3F F LPT1控制中断(IRQ7) BIOS.阅读全文
posted @ 2011-07-25 10:59 hustlijian 阅读(236) 评论(0) 编辑
摘要: http://www.dingding.biz/archives/405 http://www.hbcms.com/cms/40/365.html 修改hosts文件: hosts文件的位置:xp,2000等系统在 C:\windows\system32\drivers\etc 文件夹中找到Hosts文件并用记事本打开(Windows 9x/Me系统在C:\Windows文件夹中找) 按照 ip地址 域名 的格式添加单独的一行记录。例如72.14.219.190 www.hbcms.net注意,IP地址前面不要有空格,ip地址和域名之间,要有至少1个空格。修改后,一定要记得保存文件。 如何知道阅读全文
posted @ 2011-07-09 11:35 hustlijian 阅读(531) 评论(0) 编辑
摘要: 一、数据传送指令 指令名称 汇编语句格式 功能 影响标志位 传送move data mov opd, ops (ops) → opd;分为主存储器、通用寄存器、段寄存器,不可同时使用主存储器,类型要匹配:byte,word,dword 无 带符号扩充的传送move with sign-extend movsx opd, ops 将ops的符号向前扩展成与opd相同的数据类型后 → opdops不能为立即数, 无 带0扩展的传送move with zero-extend movzx opd, ops 将ops的高位向前补0扩展成与opd相同的数据类型后 → opd 无 数据交换exchange 阅读全文
posted @ 2011-07-02 23:06 hustlijian 阅读(312) 评论(0) 编辑
摘要: 关于什么样的职位算好的职位 你得找一家好公司 什么是好公司是呢? 产品附加值高,生意好,并且从其业务线来看,具备持续发展额能力和背景; 有专业的/聪明能干的/经验丰富的/并且为人现实的管理层,在把控着公司,并且有保证一贯这样用人的制度的公司; 有严格的财务制度,对预算、费用和利润等与投入产出有关的内容,敏感并且具有强控制力的公司; 崇尚客户导向/市场导向/结果导向/执行力的公司; 有专业严谨全面的流程和制度,并且其执行有利于推动业务的良性发展,具有控制性和实操性兼备的特点; ——总结起来,就是一家具备持续赢利能力的牛B的公司 你得找一个好方向 什么是好的方向?永远不要远离核心业务线。你得看明.阅读全文
posted @ 2011-07-02 22:52 hustlijian 阅读(31) 评论(0) 编辑
仅列出标题  下一页

无觅相关文章插件,快速提升流量