小编Rap*_*piz的帖子

汇编中的.word、.data 和.text 是什么?

我正在尝试学习更好地理解汇编程序

有人可以解释以下代码中的 .data、.word 和 .text 的含义吗?

我不明白这是做什么的以及在这种情况下它的作用

   .data
    array:
    .word 0x12121212, 0x23232323, 0x34343434, 0x4, 0x5
    .text
    add_array:
    li x1, 0x10000000
    add x3, x0, x0
    lw x2, 0(x1)
    add x3, x3, x2
    lw x2, 4(x1)
    add x3, x3, x2
    lw x2, 8(x1)
    add x3, x3, x2
    lw x2, 12(x1)
    add x3, x3, x2
    lw x2, 16(x1)
    add x3, x3, x2
Run Code Online (Sandbox Code Playgroud)

assembly

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

PyOpenGL 如何导入 obj 文件?

import pygame
import OpenGL
from pygame.locals import *
from OpenGL.GL import *
from OpenGL.GLU import *
import pywavefront


scene = pywavefront.Wavefront('Handgun_obj.obj')

vertices =(
    (1,-1,-1),
    (1,1,-1),
    (-1,1,-1),
    (-1,-1,-1),
    (1,-1,1),
    (1,1,1),
    (-1,-1,1),
    (-1,1,1),
    )

edges = (
    (0,1),
    (0,3),
    (0,4),
    (2,1),
    (2,3),
    (2,7),
    (6,3),
    (6,4),
    (6,7),
    (5,1),
    (5,4),
    (5,7)
    )

colors = (
    (1,0,0),
    (0,1,0),
    (0,0,1),
    (0,1,0),
    (1,1,1),
    (0,1,1),
    (1,0,0),
    (0,1,0),
    (0,0,1),
    (1,0,0),
    (1,1,1),
    (0,1,1),
    )

surfaces = (
    (0,1,2,3),
    (3,2,7,6),
    (6,7,5,4),
    (4,5,1,0),
    (1,5,7,2),
    (4,0,3,6)
    )



def Cube():
    glBegin(GL_QUADS)
    for surface in …
Run Code Online (Sandbox Code Playgroud)

python opengl pyopengl wavefront blender

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

标签 统计

assembly ×1

blender ×1

opengl ×1

pyopengl ×1

python ×1

wavefront ×1