Re: [问卦] 资工系不会指标怎么办?

楼主: KILLE (啃)   2017-04-06 14:23:07
※ 引述《Uniqueness (noman)》之铭言:
: 指标,c语言系列的门神
: 所有入门的人几乎都会在指标卡住
: 余下就是看自身资质看可以多久突破这个门神
: 但纵观所有程式语言,只有c语言有指标的概念
: 所以我说,不会指标应该也没什么关系吧?
智慧是解决问题 大智慧是让问题不存在
教你一招 让你不要再面对奇怪的指针问题
详见这网页 有五本书可下载
https://software.intel.com/en-us/articles/intel-sdm
#include <stdio.h>
char format[] = "%s %s\n";
char hello[] = "Hello";
char world[] = "earth";
int main(int argc, char *argv[])
{
#ifdef _MSC_VER
__asm
{
mov eax, offset world
push eax
mov eax, offset hello
push eax
mov eax, offset format
push eax
call printf
}
#endif
#ifdef __GNUC__
asm(".intel_syntax noprefix");
asm("mov eax, offset world");
asm("mov eax, offset hello");
asm("push eax");
asm("mov eax, offset format");
asm("push eax");
asm("call printf");
#endif
}
学甚番邦胡语 直接面向处理器母语吧 摆除指针 就从内联汇编开始
作者: Kevin10613 (阿一)   2017-04-06 14:24:00
大概是这样没错
作者: Uniqueness (唯一性)   2017-04-06 14:25:00
跟我想的一样
作者: ekpyrosis   2017-04-06 14:25:00
嫩 我只直写0101 你还在组语
作者: Xuxxin (Xuxin)   2017-04-06 14:27:00
hello world
作者: lovealgebra (calculus)   2017-04-06 14:30:00
是用Stack?
作者: bluebluelan (新阴流大目录免许皆传)   2017-04-06 14:33:00
结果你还不是在写C
作者: vowpool (不要丢我铜板)   2017-04-06 14:38:00
写啥组语啦 很难懂耶
作者: wemee (方天画)   2017-04-06 14:39:00
把 $1, $2 相加的结果 放到$3啦
作者: a2470abc (D.F.)   2017-04-06 14:55:00
组语喔 .....跳过
作者: JackChung (小钟钟)   2017-04-06 15:18:00
inline assembly 双刃剑啦 自己断绝让 compiler 再帮你最佳化的空间

Links booklink

Contact Us: admin [ a t ] ucptt.com