0 Members and 2 Guests are viewing this topic.
InitView: ;call once every frame, before 3DTo2D ld hl, (xto) ld bc, hl ld hl, (xfrom) ld de, hl call SubFP ld hl, de ld (xto), hl ld hl, (yto) ld bc, hl ld hl, (yfrom) ld de, hl call SubFP ld hl, de ld (yto), hl ld hl, (zto) ld bc, hl ld hl, (zfrom) ld de, hl call SubFP ld hl, de ld (zto), hl ld hl, (xto) ld bc, hl call MulFP ld ix, de ld hl, (yto) ld bc, hl call MulFP ld hl, de ld bc, ix add hl, bc ld ix, hl ld hl, (zto) ld bc, hl call MulFP ld hl, de ld de, ix add hl, de call sqrtFP ld de, hl ld hl, (xto) push de call DivFP pop de ld (xto), hl push de ld hl, (yto) call DivFP pop de ld (yto), hl ld hl, (zto) call DivFP ld (zto), hl ld hl, (xto) ld bc, hl ld hl, (xup) call MulFP ld ix, de ld hl, (yto) ld bc, hl ld hl, (yup) call MulFP ld hl, de ld bc, ix add hl, bc ld ix, hl ld hl, (zto) ld bc, hl ld hl, (zup) call MulFP ld hl, af add hl, de push hl ld hl, (xto) ld bc, hl pop hl push hl call MulFP ld hl, (xup) ld bc, hl call SubFP ld hl, de ld (xup), hl ld hl, (yto) ld bc, hl pop hl push hl call MulFP ld hl, (yup) ld bc, hl call SubFP ld hl, de ld (yup), hl ld hl, (zto) ld bc, hl pop hl call MulFP ld hl, (zup) ld bc, hl call SubFP ld hl, de ld (zup), hl
What assembler are you using?
And welcome to Omnimaga, ben_g
I only ever used TASM when I tried learning assembly and it doesn't run on 64 bit OSes.
InitView: ;call once every frame, before 3DTo2D ld hl, (xto) ld bc, hl ; 16-bit register-to-register transfer illegal ld hl, (xfrom) ld de, hl ; 16-bit register-to-register transfer illegal call SubFP ld hl, de ; 16-bit register-to-register transfer illegal ld (xto), hl ld hl, (yto) ld bc, hl ; 16-bit register-to-register transfer illegal ld hl, (yfrom) ld de, hl ; 16-bit register-to-register transfer illegal call SubFP ld hl, de ; 16-bit register-to-register transfer illegal ld (yto), hl ld hl, (zto) ld bc, hl ; 16-bit register-to-register transfer illegal ld hl, (zfrom) ld de, hl ; 16-bit register-to-register transfer illegal call SubFP ld hl, de ; 16-bit register-to-register transfer illegal ld (zto), hl ld hl, (xto) ld bc, hl ; 16-bit register-to-register transfer illegal call MulFP ld ix, de ; 16-bit register-to-register transfer illegal ld hl, (yto) ld bc, hl ; 16-bit register-to-register transfer illegal call MulFP ld hl, de ; 16-bit register-to-register transfer illegal ld bc, ix ; 16-bit register-to-register transfer illegal add hl, bc ld ix, hl ; 16-bit register-to-register transfer illegal ld hl, (zto) ld bc, hl ; 16-bit register-to-register transfer illegal call MulFP ld hl, de ; 16-bit register-to-register transfer illegal ld de, ix ; 16-bit register-to-register transfer illegal add hl, de call sqrtFP ld de, hl ; 16-bit register-to-register transfer illegal ld hl, (xto) push de call DivFP pop de ld (xto), hl push de ld hl, (yto) call DivFP pop de ld (yto), hl ld hl, (zto) call DivFP ld (zto), hl ld hl, (xto) ld bc, hl ; 16-bit register-to-register transfer illegal ld hl, (xup) call MulFP ld ix, de ; 16-bit register-to-register transfer illegal ld hl, (yto) ld bc, hl ; 16-bit register-to-register transfer illegal ld hl, (yup) call MulFP ld hl, de ; 16-bit register-to-register transfer illegal ld bc, ix ; 16-bit register-to-register transfer illegal add hl, bc ld ix, hl ; 16-bit register-to-register transfer illegal ld hl, (zto) ld bc, hl ; 16-bit register-to-register transfer illegal ld hl, (zup) call MulFP ld hl, af ; 16-bit register-to-register transfer illegal, and ridiculous add hl, de push hl ld hl, (xto) ld bc, hl ; 16-bit register-to-register transfer illegal pop hl push hl call MulFP ld hl, (xup) ld bc, hl ; 16-bit register-to-register transfer illegal call SubFP ld hl, de ; 16-bit register-to-register transfer illegal ld (xup), hl ld hl, (yto) ld bc, hl ; 16-bit register-to-register transfer illegal pop hl push hl call MulFP ld hl, (yup) ld bc, hl ; 16-bit register-to-register transfer illegal call SubFP ld hl, de ; 16-bit register-to-register transfer illegal ld (yup), hl ld hl, (zto) ld bc, hl ; 16-bit register-to-register transfer illegal pop hl call MulFP ld hl, (zup) ld bc, hl ; 16-bit register-to-register transfer illegal call SubFP ld hl, de ; 16-bit register-to-register transfer illegal ld (zup), hl