|
  
|
[操作疑難] SHELL SCRIPT 可以不要每次问如何执行吗, 解决了
本帖最後由 xiao 於 2016-4-15 14:10 編輯
后来楼下的高手给了 ./desktop 的方法,终于达成了,一般使用者就方便了很多,特别是WINDOWS的。详情看楼下的方法。
另外实验过用 asm 写个简单的 system call scrot -b -s, 不同 SHELL SCRIPT 的方法, 也可以执行,但还是继续问,只是选项少了。
不过有了这个 ./Desktop 的方法后,system call 也可以照猫画虎,有兴趣的自己编译一下,再改改 a.desktop就好用得很了
[code]
@ REF : http://www.science.smith.edu/dft ... th_the_Raspberry_Pi
@ xiaolaba
@ 2016-04-14
@ modified to test 'system' call and to invoke scrot to capture a screen
@ how to assenble and link, open terminal, type following, but remove @
@ as -o hello.o hello.s
@ gcc -o snap hello.o
@ hello.s
@ D. Thiebaut
@ Just your regular Hello World program!
@
@ ---------------------------------------
@ Data Section
@ ---------------------------------------
.data
string: .asciz "\nHello World! This is xialaba and Linux programming\n\n"
para : .asciz "scrot -b -s"
@ ---------------------------------------
@ Code Section
@ ---------------------------------------
.text
.global main
.extern printf
.extern system
main:
push {ip, lr}
ldr r0, =string @ print hello world
bl printf
ldr r0, =para @ invoke scrot to capture screen
bl system
pop {ip, pc}
[/code] |
|
|
附件: 您需要登錄才可以下載或查看附件。沒有帳號?註冊
|