小编Dyl*_*lan的帖子

从另一台服务器连接到aws服务器上的MongoDB

我正在从我的localhost创建一个javascript meteor应用程序,但我希望我的数据库存储在一个单独的aws服务器上.

我是MongoDB和aws的新手.我想知道如何从我的本地主机连接到我的数据库?

javascript mongodb amazon-web-services meteor

8
推荐指数
1
解决办法
1035
查看次数

装配与C代码比较

我目前正在学习汇编和C编程语言,我有几个问题.

C代码

int arith(int x, int y, int z) {
    int t1 = x + y;
    int t2 = z*48;
    int t3 = t1 & 0xFFFF;
    int t4 = t2 * t3;
    return t4;
}
Run Code Online (Sandbox Code Playgroud)

汇编代码

movl  16(%ebp),%eax         z
leal  (%eax,%eax,2), %eax   z*3
sall  $4,%eax               t2 = z*48
movl  12(%ebp),%edx         y
addl  8(%ebp),%edx          t1 = x+y
andl  $65535,%edx           t3 = t1&0xFFFF
imull %edx,%eax             Return t4 = t2*t3
Run Code Online (Sandbox Code Playgroud)

而不是使用leal然后移动4乘以z乘以48,我可以使用imull $ 48,%eax吗?

此外,这是多次使用%edx寄存器.这是否意味着t1被覆盖?换句话说,如果我愿意,我还能在t4之前检索t1吗?

c x86 assembly att

5
推荐指数
1
解决办法
137
查看次数

标签 统计

amazon-web-services ×1

assembly ×1

att ×1

c ×1

javascript ×1

meteor ×1

mongodb ×1

x86 ×1