Quote from: FORTRANS on May 20, 2024, 10:27:06 PMWell, that book has seventy to eighty odd more of the same ilk.
Quote from: jj2007 on May 20, 2024, 08:18:43 AMI must say that the *.bas code is a really ugly example of spaghetti code - it hurts the eye.
Quote from: tda0626 on May 20, 2024, 07:18:05 AMIn any case, I think my next step is to treat each quadrant in its own routine and to get that working.
.code
p0:
deb 4, "P0", eax
retn
p1:
deb 4, "P1", eax
retn
...
g0:
deb 4, "G0", eax
jmp @back
g1:
deb 4, "G1", eax
jmp @back
...
For_ ecx=0 To 2
lea eax, [ecx+100] ; pass a value in eax
OnIndexCall ecx, p0, p1, p2
Next
For_ ecx=0 To 2
lea eax, [ecx+1000] ; pass a value in eax
OnIndexGoto ecx, g0, g1, g2
@back:
Next
Quote from: Davis on May 20, 2024, 09:54:30 AMthnx 4 the help
Quote from: tda0626 on May 20, 2024, 07:18:05 AMIt might be a case of inverting the the y by subtracting the y given from the y max value but don't know if I want to go that far. We will see.If you do, the formula would be really simple:
Yactual = -YCartesian + Ymax
; Define a global structure (WC), partially initialized:
WC WNDCLASSEX < SIZEOF WNDCLASSEX, \
CS_HREDRAW or CS_VREDRAW or CS_BYTEALIGNWINDOW or CS_DBLCLKS, \
NULL, \ ;lpfnWndProc
NULL, \ ;cbClsExtra
NULL, \ ;cbWndExtra
NULL, \ ;hInstance
NULL, \ ;hIcon
NULL, \ ;hCursor
NULL, \ ;hbrBackground
NULL, \ ;lpszMenuName
NULL, \ ;lpszClassName
NULL > ;hIconSm
; Now define a local structure (wc) in a subroutine:
SomeProc PROC
LOCAL wc:WNDCLASSEX