Steve,
I had a feeling it was from compiling ClearScreen and locate with lcc.
I extracted all the object files from bxblib.lib and replaced ClearScreen and locate with:
ClearScreen:
; *************BxbAsm Compiler*************
; Copyright: sarbayo (c) 2004-2012
; =========================================================================
.486 ; use 486 instructions
.model flat, stdcall ; Win32 memory model
option casemap:none ; case sensitive
include windows.inc
include stdlib.inc
.code
CStr macro pszText:VARARG
local szText
.const
szText db pszText,0
.code
exitm <offset szText>
endm
;------------------------------------------------------------------------------
ClearScreen proc
; --------------------------------------------------
invoke system,CStr("cls")
ret
; --------------------------------------------------
ClearScreen endp
end
locate:
.486
.model flat, stdcall
option casemap:none
include windows.inc
.code
locate proc col:DWORD,row:DWORD
local coordScreen:COORD,hConsole:HANDLE
mov eax,col
mov coordScreen.X,ax
mov eax,row
mov coordScreen.Y,ax
invoke GetStdHandle,STD_OUTPUT_HANDLE
mov hConsole,eax
invoke SetConsoleCursorPosition,hConsole,coordScreen
ret
locate endp
end
I then created a new library with ar and used jwlink to link.
output:
C:\bxb-linux>jwasm /c /coff /Cp "test6.asm"
JWasm v2.07pre, Nov 2 2011, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
test6.asm: 137 lines, 2 passes, 187 ms, 0 warnings, 0 errors
C:\bxb-linux>jwlink system pe_con name test6.exe file test6.obj LIBRARY kernel
32.lib,msvcrt.lib, user32.lib,fpu.lib, bxblib.lib
JWlink Version 1.9
Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
loading object files
searching libraries
creating a PE executable
C:\bxb-linux>
All is well:)
Now time for more testing and then a try at porting
James
Edit: test6.bas
1 REM test.bas version 6
DIM Row = 0, Column = 0
2 CLS
3 PRINT "hello world!"
4 LET Row = 2
5 LET Column = 10
6 LOCATE Row, Column
7 PRINT "hello world!"
8 LET Row = 4
9 LET Column = 20
10 LOCATE Row, Column
11 PRINT "hello world!"
12 END