I failed to compile USBDRIVE.A36

The intent of this forum is to discuss my DOS TSR programs (available at http://bretjohnson.us), how they work and don't work, new/missing features, status of updates, and anything else related to them that may need to be discussed.

I failed to compile USBDRIVE.A36

Postby shen » Sat Jan 18, 2020 1:29 pm

Hi Bret.
Thank you very much! you have made such an amazing software. These days I am trying to compile some USB DOS source code. I made it to compile USBUHCI.A36 by A386 USBUHCI.A36 command line and created USBUHCI.COM successfully; however when I compiled USBDRIVE.A36, the compiler displayed error message.

A386 USBDRIVE.A36
A386 macro assembler, V4.05 ... ...
Source:
usbdrive.a36
Error messages inserted into usbdrive.a36
Original source renamed as usbdrive.ERR
[/i]

would you please give me some suggestions?

Thank you so much again.

Sheng
shen
 
Posts: 4
Joined: Sat Jan 18, 2020 1:17 pm

Re: I failed to compile USBDRIVE.A36

Postby Bret » Mon Jan 27, 2020 10:57 am

Sorry for the late reply. I haven't checked the forum in awhile.

I have an older version of A386 (v0.75), and my A86 version is 4.02. I suspect Eric Isaacson has changed something in the later versions of Ax86 that is keeping it from working.

All I can suggest is looking at the inserted error messages and seeing if you can figure out what the problems are. I suspect the problems will be pretty minor. Of course, you will need a text editor that can handle large files to be able to fix it, which "normal" DOS programs (like EDIT) can't do.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: I failed to compile USBDRIVE.A36

Postby shen » Mon Jan 27, 2020 10:30 pm

I opened USBDRIVE.A36 with rhide editor that comes with GJGCC. I am not very familiar with A386 assembler and thought that the inserted message inserted by the compiler should be marked with @ sign so I searched and found the following lines at the very beginning of the source file, as follows:

~^
#ERROR messages will be removed if you leave these first two lines in @@@@#
JMP Main ;Skip over TSR Code to Main Program


and at line 21159 we see:

G20: ;Have at least one valid Alias
CALL WriteCrLfPause ;If valid, move down
OR CH,CH ;Writing Single characters?
JNZ >G40 ;If not, handle full numbers
MOV CL,78 ;Write this many characters per line
CMP AL,' ' ;Is there a valid single-character equivalent?
JB >G30 ;If not, don't write it
CALL WriteAL ;If so, write it
JMP >G50 ;Continue
~ ^
#ERROR 99: Symbol Table Overflow @@@@#
G30: ;Not a writable character
CALL WriteBlock ;Write a Block Character
JMP >G50 ;Continue
G40: ;Need to write Numbers
MOV CL,76 ;Write this many characters per line
PUSH AX ;Save the number for a second
CMP CH,2 ;Do we need to modify the Number?
JNE >G45 ;If not, continue
shen
 
Posts: 4
Joined: Sat Jan 18, 2020 1:17 pm

Re: I failed to compile USBDRIVE.A36

Postby Bret » Tue Jan 28, 2020 4:35 am

Well, you found the Error Message:

#ERROR 99: Symbol Table Overflow @@@@#

This indicates that you have run out of memory. A86 & A386 don't take advantage of extended or expanded memory, so everything they do must fit in the conventional 640k of memory. Eric Isaacson and I had an e-mail exchange about this several years ago, and he said he was not going to fix it because he was working on a Windows version of A86. I don't think he's ever released the Windows version, though.

A couple of things you can try that may help. First of all, try to boot with as few TSR's and device drivers as you can to make sure you maximize conventional memory. I don't know if this will actually help or not, though. The size of the symbol table may not actually increase if you do that. The extra memory may get used for something else instead of the symbol table.

The other thing you can do is to break up the source code into smaller pieces, compile them, and then link them back together. They do this with "regular" programs all the time, but it becomes a little more problematic with TSR's since you actually need some control over exactly where things get put into memory. When you use linkers you don't have all that much control.

FYI, I've been using NASM instead of A86 lately, at least for my larger projects. Unlike A86, NASM takes advantage of the extra memory you have so you can create large source code files with no problem. But, it takes a lot of work to convert A86 source code to make it compatible with NASM, and I don't have a lot of time these days to work on those kinds of things.

Since you seem to have a licensed copy of A86, I don't think I would have a problem sending you copies of the older versions I have of A86 & A386, and you may be able to compile the program again that way.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: I failed to compile USBDRIVE.A36

Postby shen » Tue Jan 28, 2020 2:09 pm

Bret, thank you so much for your time and help. The compiling problem has not been resolved. I would like to receive a copy of an older version A386 assembler from you
I am using FreeDOS, there are 3 lines in the FDCONFIG.SYS:

DEVICE=C:\FDOS\BIN\HIMEMX.EXE
DEVICE=C:\FDSOS\BIN\JEMM386.EXE NOEMS I=B000-B7FF
DOS=HIGH,UMB

and MEM command displays the following message:

Memory Type Total Used Free
---------------- -------- -------- --------
Conventional 639K 19K 620K
Upper 108K 0K 108K
Reserved 277K 277K 0K
Extended (XMS) 2,086,528K 436K 2,086,092K
---------------- -------- -------- --------
Total memory 2,087,552K 732K 2,086,820K

Total under 1 MB 747K 19K 728K

Total Expanded (EMS) 8,640K (8,847,360 bytes)
Free Expanded (EMS) 8,192K (8,388,608 bytes)

Largest executable program size 619K (634,272 bytes)
Largest free upper memory block 73K ( 75,232 bytes)
FreeDOS is resident in the high memory area.
shen
 
Posts: 4
Joined: Sat Jan 18, 2020 1:17 pm

Re: I failed to compile USBDRIVE.A36

Postby Bret » Thu Jan 30, 2020 4:27 am

This shows you have 620k of available memory, which should be plenty. Apparently newer versions of A386 use more meory than the old ones and don't use extra memory for the symbol table. I'll send you older copies of A86 & A386 since you seem to already have licensed newer versions.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM


Return to Programs

Who is online

Users browsing this forum: No registered users and 2 guests

cron