예제 #1
0
    def asm_code_bool(self):
        code = """
            #DATA
        """
        code += Ray.asm_struct() + Rectangle.asm_struct() + """
            Ray ray1
            Rectangle rec1
            float min_dist = 99999.000
            uint32 ret

            #CODE
            macro mov eax, ray1
            macro mov ebx, rec1 
            macro mov ecx, min_dist
            call ray_rectangle_intersection 
            mov dword [ret], eax

            #END
        """
        return code
예제 #2
0
    def asm_code_bool(self):
        code = """
            #DATA
        """
        code += Ray.asm_struct() + Rectangle.asm_struct() + """
            Ray ray1
            Rectangle rec1
            float min_dist = 99999.000
            uint32 ret

            #CODE
            macro mov eax, ray1
            macro mov ebx, rec1 
            macro mov ecx, min_dist
            call ray_rectangle_intersection 
            mov dword [ret], eax

            #END
        """
        return code
예제 #3
0
    def asm_code(self):
        code = """
            #DATA
        """
        code += Ray.asm_struct() + Rectangle.asm_struct() + HitPoint.asm_struct() + """
            Ray ray1
            Rectangle rec1
            Hitpoint hp1
            float min_dist = 99999.000
            uint32 ret

            #CODE
            mov eax, ray1
            mov ebx, rec1 
            mov ecx, min_dist
            mov edx, hp1
            call ray_rectangle_intersection 
            mov dword [ret], eax

            #END
        """
        return code
예제 #4
0
    def asm_code(self):
        code = """
            #DATA
        """
        code += Ray.asm_struct() + Rectangle.asm_struct(
        ) + HitPoint.asm_struct() + """
            Ray ray1
            Rectangle rec1
            Hitpoint hp1
            float min_dist = 99999.000
            uint32 ret

            #CODE
            mov eax, ray1
            mov ebx, rec1 
            mov ecx, min_dist
            mov edx, hp1
            call ray_rectangle_intersection 
            mov dword [ret], eax

            #END
        """
        return code