Can someone explain how to make an object file I just dont get it. Here is the code I am trying to output. I want to link the object file with crinkler.exe which is a compressor+linker but this code keeps throwing errors. (Please forgive the fact that code doesnt clean up afterwards im trying to get openGL quad in 1kb)
error at section declarations (what extra charictors on line? object files dont need to know section priveledges or something?)
;
; OpenGL programming example
;
;format PE GUI 4.0
format MS COFF
;entry start
include 'win32a.inc'
GL_QUADS = 0x0007
GL_COLOR_BUFFER_BIT = 0x4000
section '.code' code readable executable
start:xor eax,eax
invoke CreateWindowEx,WS_EX_TOPMOST,EDIT,eax,WS_VISIBLE+WS_POPUP+WS_MAXIMIZE,eax,eax,eax,eax,eax,eax,eax,eax
invoke GetDC,eax
xchg eax,ebp
invoke ChoosePixelFormat,ebp,PFD
invoke SetPixelFormat,ebp,eax,PFD
invoke wglCreateContext,ebp
invoke wglMakeCurrent,ebp,eax
draw: invoke glClear,GL_COLOR_BUFFER_BIT
mov ebx, 0.7
mov edi,-0.7
invoke glRotatef, ebx, eax, eax, ebx
invoke glBegin,GL_QUADS
invoke glColor3f, ebx, eax, eax
invoke glVertex3f, edi, edi, edi
invoke glVertex3f, ebx, edi, edi
invoke glColor3f, eax, eax, ebx
invoke glVertex3f, ebx, ebx, edi
invoke glVertex3f, edi, ebx, edi
invoke glEnd
invoke SwapBuffers,ebp
invoke GetAsyncKeyState,VK_ESCAPE
or eax,eax
jz draw
invoke ExitProcess
EDIT db 'EDIT'
PFD dd 0,PFD_SUPPORT_OPENGL+PFD_DOUBLEBUFFER+PFD_DRAW_TO_WINDOW
section '.idata' import data readable writeable
library kernel, 'KERNEL32',\
user, 'USER32',\
gdi, 'GDI32',\
opengl, 'OPENGL32'
import kernel, ExitProcess,'ExitProcess'
import user, CreateWindowEx,'CreateWindowExA',\
GetAsyncKeyState,'GetAsyncKeyState',\
GetDC,'GetDC'
import gdi, ChoosePixelFormat,'ChoosePixelFormat',\
SetPixelFormat,'SetPixelFormat',\
SwapBuffers,'SwapBuffers'
import opengl, glBegin,'glBegin',\
glClear,'glClear',\
glColor3f,'glColor3f',\
glEnd,'glEnd',\
glRotatef,'glRotatef',\
glVertex3f,'glVertex3f',\
wglCreateContext,'wglCreateContext',\
wglMakeCurrent,'wglMakeCurrent'