Author Topic: error msg?  (Read 70009 times)

dedndave

  • Member
  • *****
  • Posts: 8823
  • Still using Abacus 2.0
    • DednDave
Re: error msg?
« Reply #30 on: July 01, 2012, 05:10:32 AM »
ok Jack
i think we have a handle on the problem   :P

Code: [Select]
Set INCLUDE=g:\jpsdhrs
Set PATH=g:\jpshdrs
Set PATH=g:\goasm.exe
GoAsm /l/b/c  MyProg.asm

when you use SET PATH, it replaces the old PATH variable
so - first, you set the PATH to one folder, then to another
also - you cannot set a file into the PATH - only folders

what you really want to do is add a folder to the PATH - not replace it entirely
you can do this by expanding the previous value for the PATH variable...
Code: [Select]
SET PATH=G:\jpshdrs;G:\goasm;%PATH%i am not so sure that you really want the header files in the PATH, however

try this batch file...
Code: [Select]
Set INCLUDE=g:\jpsdhrs
Set PATH=g:\goasm;%PATH%
GoAsm /l/b/c  MyProg.asm

dedndave

  • Member
  • *****
  • Posts: 8823
  • Still using Abacus 2.0
    • DednDave
Re: error msg?
« Reply #31 on: July 01, 2012, 05:46:03 AM »
i just realized you may have another problem
that is...
the batch file you use to assemble is not in the PATH
this is why you have to place your ASM file in the same folder as the batch file

personally, i would set it up something like this
names without an extension are folders
names with an extension are files
follow the indentation to get an idea of the hierarchy...

Code: [Select]
G:\
--- GoAsm
------- Asm     (this is where you want to put your projects)
------- Bin     (this is where the GoAsm EXE files go - AND the batch files used to assemble/link)
------- Help    (this is where the CHM and HTML help files go)
------- Include (this is where the headers go, with all the sub-folders)
i would then modify the system-wide environment variables (My Computer/Properties/Advanced tab)
PATH - i would add G:\GoAsm\Bin to the current PATH variable
INCLUDE - i would create a variable and point it to G:\GoAsm\Include

shankle

  • Member
  • ****
  • Posts: 835
Re: error msg?
« Reply #32 on: July 01, 2012, 07:05:02 AM »
Thanks Dave,
Not sure I understand all of it but will give it a whirl.
Wish me luck...

shankle

  • Member
  • ****
  • Posts: 835
Re: error msg?
« Reply #33 on: July 01, 2012, 10:49:47 PM »
Status as of 7-1-2012.
MyProg.asm - #define LINKFILES,  #define jpshdrs,  #include g:\jpshdrs
MyProgbtch.bat - Set INCLUDE= g:\jpshdrs, Set PATH=g:\codejps,
                            GoAsm /l/b/c MyProg.asm

GoAsm folder (g) -
   bin          -  golink, Gorcjorg, GoAsm.exe, MyProgbtch.bat
   codejps  -  MyProg.asm
   gozips    -  Crimson editor svn286m, cedt-286m-setup.exe,
                     GoAsm.zip,  Gorcjorg.zip
   helpjps   -  forhelp.txt,  GoAsm.chm
   jpshdrs   -  (hopefully correct now. Before I had sub folders. Now only jpshdrs)
   files        -  cderr.h,  cedt.cmd,  cedt.exe,  cedt.mac,  cmdline.txt(empty)

I am afraid to mess with the environment variables Dave. It's different in Windows 7.
Can't it be made to work with the batch file?
Here is the ERROR message I get now:  ERROR - Could not open assembler source
file (MyProg.asm).  OBJ file not made.
Not trying to do the link as yet.
 

dedndave

  • Member
  • *****
  • Posts: 8823
  • Still using Abacus 2.0
    • DednDave
Re: error msg?
« Reply #34 on: July 01, 2012, 10:57:39 PM »
ok - let's take a safe approach   :biggrin:

when you open a console window and type:
PATH
and hit enter...
it will show you a list of folders, seperated by semicolons
find one of the folders that is already in the path
then, use that folder for your batch file
that way, when you type the name of the batch file, the OS can find it

then, we can use this for a batch file...
Code: [Select]
Set INCLUDE=g:\jpsdhrs
Set PATH=g:\goasm;%PATH%
GoAsm /l/b/c  MyProg.asm

shankle

  • Member
  • ****
  • Posts: 835
Re: error msg?
« Reply #35 on: July 02, 2012, 12:45:34 AM »
Hi Dave,
Got the Compile to output an ".obj" file.

MyProgbtch.bat - Set include=g:\jpshdrs,  Set PATH=g:\codejps,  GoAsm /l/b/c MyProg.asm
Here is what I did to get it to work. There is most likely a better way.

I moved MyProgbtch.bat and GoAsm.exe from the bin folder to the codejps folder.
In DOS I changed the c drive to the g drive: then did a g:cd \codejps
Executed MyProbtch.bat from the codejps folder and it compiled MyProg.asm
and output the MyProg.obj file.

From all this I'm expecting a the same hassle with the link process.

Just as a side my 10 ft dish survived Debbie and is working flawlessly.
If we get another one heading my way I'm going to take the dish down
and move it into the garage.
Thanks Dave for your patience.

dedndave

  • Member
  • *****
  • Posts: 8823
  • Still using Abacus 2.0
    • DednDave
Re: error msg?
« Reply #36 on: July 02, 2012, 02:26:37 AM »
well - at least you know it can work   :t

however, that sounds like a lot of typing to go through
i happened to think of another way...

you can create a desktop icon for the command prompt
the easiest way to do that is to right-click on the command prompt shortcut that is in the start menu
then click Copy
then right-click on the desktop and click Paste
that should copy the shortcut to the desktop

once you have a desktop shortcut for the command prompt,
you can modify it by right-clicking on it - then Properties
you can make it run a batch file for you on startup that will only apply to that shortcut
(i.e. it won't affect the command prompt shortcut that is in the start menu)

that batch file can be located in G:\GoAsm\Bin and can be something simple like this
Code: [Select]
@ECHO OFF
SET PATH=G:\GoAsm\Bin;%PATH%
SET INCLUDE=G:\GoAsm\Include
G:
CD \GoAsm\Asm

then you can put all your stuff back where it was

as an added touch, you can rename the desktop shortcut to "GoAsm Console" or something

shankle

  • Member
  • ****
  • Posts: 835
Re: error msg?
« Reply #37 on: July 02, 2012, 03:09:06 AM »
Status as of 7-1-2012.
Made a temp batch file for linking: - Set INCLUDE=g:\jpshdrs, Set PATH=g:\codejps,
 GoLink /unused Kernel32.dll, User32.dll, Gdi32.dll, winspool.drv MyProg.obj
This of course gave errors. I thought all the Set commands with "jpshdrs" made the
header files available to the program and the linker. Obviously not.
Here are a few of the 40 or so items not defined in the object file - cbsize, hinstance, hwnd,
ShowWindowA, UpdateWindowA, msg, TransLateMessage, msg.wParam, GlobalAllocA.

I changed every API in the program from EX: ShowWindow to ShowWindowA. Maybe that's
not necessary.

dedndave

  • Member
  • *****
  • Posts: 8823
  • Still using Abacus 2.0
    • DednDave
Re: error msg?
« Reply #38 on: July 02, 2012, 03:35:21 AM »
yah - you should be able to take any one of Edgar's examples and make it fly   :t

shankle

  • Member
  • ****
  • Posts: 835
Re: error msg?
« Reply #39 on: July 02, 2012, 11:08:05 PM »
Compiles correctly.
At link time I get 3 error messages that the items are not found in the compile
or link: 
   cbsize,  CS_BYTEALIGNWINDOW,  hInstance
The headers are there to be used......

CS_BYTEALIGNWINDOW is used in WNDCLASSEX

cbsize is used in DOCINFO(A)

hInstance is used in .code/start but it isn't defined prior to that....????
  also in WNDPROC in a LOCAL hInst: HINSTANCE


dedndave

  • Member
  • *****
  • Posts: 8823
  • Still using Abacus 2.0
    • DednDave
Re: error msg?
« Reply #40 on: July 03, 2012, 11:33:06 AM »
maybe you can post the source ?

wjr

  • Member
  • **
  • Posts: 209
    • WJR's website
Re: error msg?
« Reply #41 on: July 04, 2012, 10:30:25 AM »
Getting there... try cbSize - I think you need more there to, as in DOCINFO.cbSize, or whatever you named your instance of that structure (ex. MyDocInfo.cbSize). As for hInstance, you could define that as a global data variable. Not sure why CS_BYTEALIGNWINDOW shows up as not found since you seem to have the header files sorted out.

shankle

  • Member
  • ****
  • Posts: 835
Re: error msg?
« Reply #42 on: July 04, 2012, 12:23:20 PM »
My latest fumblings 7-3.

CS_BYTEALIGNWINDOW, FF_ROMAN, IDI_APPLICATION were solved by the following code:
  Styleid  db  'CS_BYTEALIGNWINDOW',0
  ffr         db  ' FF_ROMAN',0
  appid    db 'IDI_APPLICATION',0
 These were fixed in WNDCLASSEX for EX:
     D[wc.style], addr styleid etc.

Appname  db 'MyProg.exe',0
These formats of DOCINFOA don't work:
  doci  DOCINFOa, [cbsize], [ Appname], null, null,0
  doci  DOCINFOa, cbsize, Appname, null, null,0
  doci  DOCINFOa, <cbsize, Appname, null, null,0>  ; this one worked in MASM32
All three gave an error message that doesn't make any sense:
   Misplaced Comma:-  , cbsize, Appname, null, null, 0

Thanks guys for the help.....



wjr

  • Member
  • **
  • Posts: 209
    • WJR's website
Re: error msg?
« Reply #43 on: July 04, 2012, 01:45:51 PM »
Hmmm, fumblings is accurate... the compile errors will go away, but not really "solved" since your wc.style is actually now an address (and that address now points to a string, instead of a value). A more proper way to do something like this would be:

mov   D[wc.style], CS_BYTEALIGNWINDOW

doci   DOCINFO   <SIZEOF(DOCINFO), Appname, NULL, NULL, 0>

If this does not work for you, then your build process still has an issue with accessing the definitions in the header files. As for IDI_APPLICATION, that looks like an ID for an icon which should be defined in your resource RC file... that definition also needs to be in your ASM file (or in a common include file for the project).

dedndave

  • Member
  • *****
  • Posts: 8823
  • Still using Abacus 2.0
    • DednDave
Re: error msg?
« Reply #44 on: July 04, 2012, 02:12:14 PM »
IDI_APPLICATION is one of the standard windows icons
it should be defined in user32.h

my mistake - it should be defined in winuser.h