小编Dan*_*ebb的帖子

J编程语言中的数组

如何使用J编程语言进行数组访问?例如,使用C++作为我的伪代码语言:

int M [100];  // declare an array called M
int j = 5;  //index into the array
int y = 10;  //value to store or load from the array

M[j] = y;  // store y into the array

y = M[j];  // load y from the array
Run Code Online (Sandbox Code Playgroud)

在惯用的J中,这些类型的数组访问会是什么样的?

c++ j

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

如何在覆盆子pi汇编语言中使用"printf"

printf您可以打印的值的数量是否有限制?

这是我的代码.

.data
.balign 4       
   string: .asciz "\n%d %d %d %d\n"        
.text
.global main
.extern printf

main:
    push    {ip, lr}        @ push return address + dummy register
                            @ for alignment
    ldr     r0, =string     @ get address of string into r0
    mov     r1, #11
    mov     r2, #22
    mov     r3, #33
    mov     r4, #444
    bl      printf          @ print string and pass params
                            @ into r1, r2, and r3
    pop     {ip, pc}        @ pop return address into pc
Run Code Online (Sandbox Code Playgroud)

当我编译并执行此代码时,它打印出来:

11 22 33 …

assembly arm

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

标签 统计

arm ×1

assembly ×1

c++ ×1

j ×1