Author Topic: BxbAsm  (Read 164326 times)

jcfuller

  • Guest
BxbAsm
« on: October 19, 2011, 11:37:25 AM »
I was interested in Steve's BxbAsm so I ported it to Ubx on both Windows and Linux.
It is not a complete port of course because Steve is still working on converting BxbAsm to use JWAsm.

James

SteveA

  • Guest
Re: BxbAsm
« Reply #1 on: October 19, 2011, 12:33:50 PM »
This is way too cool James.

Steve

jcfuller

  • Guest
Re: BxbAsm
« Reply #2 on: October 19, 2011, 12:45:48 PM »
Here are the sources.

James

SteveA

  • Guest
Re: BxbAsm
« Reply #3 on: October 19, 2011, 01:34:55 PM »
This is awesome James.
The question now is, will it do an assembly ?

SteveA

  • Guest
Re: BxbAsm
« Reply #4 on: October 21, 2011, 10:35:39 AM »
I've been setting up JWasm and making a few modifications to Bxbasm, to bring it up to date, so the two will work together.
I can get JWasm working just fine, (so far), using Masm32 Include and Lib files, but, that isn't the point.
The key is to get Bxbasm source files to compile and assemble using Include and Lib files other than Masm32.
I hope to have something working by today.

jcfuller

  • Guest
Re: BxbAsm
« Reply #5 on: October 21, 2011, 12:33:06 PM »
JWasm has a wininc and you can create the *.lib you need.
The biggest stumbling block is the same one I ran into and that is the vast macros and proc's in masm32.lib

James

SteveA

  • Guest
Re: BxbAsm
« Reply #6 on: October 21, 2011, 02:09:08 PM »
Quote
The biggest stumbling block is the same one I ran into and that is the vast macros and proc's in masm32.lib

Yes, that's what I'm looking at now.

SteveA

  • Guest
Re: BxbAsm
« Reply #7 on: October 21, 2011, 04:00:03 PM »
Quote
JWasm has a wininc and you can create the *.lib you need.

Hmm...
I created the predefined *.lib files from ..\wininc\Def\ .
I'm not at all clear on how to create my own *.lib files or the missing ..\Include\ files.
Any pointers ?
« Last Edit: October 21, 2011, 06:42:33 PM by SteveA »

jcfuller

  • Guest
Re: BxbAsm
« Reply #8 on: October 21, 2011, 04:23:35 PM »
I don't know why you need to create libs at this juncture.
To start you will need to write or find substitutes for the missing procs/macros you were using from masm32.lib.
The sources are available which might give you insight into writing your own or as I suggested in my email use the MinGW libs.

James


SteveA

  • Guest
Re: BxbAsm
« Reply #9 on: October 21, 2011, 06:53:35 PM »
Quote
I don't know why you need to create libs at this juncture.

There are Includes and Libs that Bxbasm uses (in Masm32) that are not part of JWasm.
Code: [Select]
; Include files
    include \masm32\include\windows.inc
    include \masm32\include\masm32.inc
    include \masm32\include\user32.inc
    include \masm32\include\gdi32.inc
    include \masm32\include\kernel32.inc
    include \masm32\include\Comctl32.inc
    include \masm32\include\comdlg32.inc
    include \masm32\include\shell32.inc
    include \masm32\include\oleaut32.inc
    include \masm32\include\crtdll.inc
    include \masm32\include\fpu.inc

    includelib \masm32\lib\masm32.lib
    includelib \masm32\lib\user32.lib
    includelib \masm32\lib\gdi32.lib
    includelib \masm32\lib\kernel32.lib
    includelib \masm32\lib\Comctl32.lib
    includelib \masm32\lib\comdlg32.lib
    includelib \masm32\lib\shell32.lib
    includelib \masm32\lib\oleaut32.lib
    includelib \masm32\lib\crtdll.lib
    includelib \masm32\lib\fpu.lib

Masm32.inc is one part of it.
The current functionality of Bxbasm is dependant on a number of things being present.

jcfuller

  • Guest
Re: BxbAsm
« Reply #10 on: October 22, 2011, 04:12:42 AM »
Steve,
  I did get test.bas to translate and compile using this bxb.inc but not linked as the items in masm32.lib are missing.

James

Code: [Select]
;/* BXB.INC */

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
; Include files
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
include \jwasm\wininc\include\WINDOWS.INC

    include \jwasm\wininc\include\windows.inc
;    include \masm32\include\masm32.inc
;    include \jwasm\wininc\include\user32.inc
;    include \jwasm\wininc\include\gdi32.inc
;    include \jwasm\wininc\include\kernel32.inc
    include \jwasm\wininc\include\Commctrl.inc
    include \jwasm\wininc\include\commdlg.inc
    include \jwasm\wininc\include\shellapi.inc
    include \jwasm\wininc\include\oleauto.inc
;    include \jwasm\wininc\include\crtdll.inc
;    include \masm32\include\fpu.inc

;    includelib \masm32\lib\masm32.lib
;    includelib \jwasm\wininc\lib\user32.lib
;    includelib \jwasm\wininc\lib\gdi32.lib
;    includelib \jwasm\wininc\lib\kernel32.lib
    includelib \jwasm\wininc\lib\Commctrl.lib
    includelib \jwasm\wininc\lib\commdlg.lib
    includelib \jwasm\wininc\lib\shellapi.lib
    includelib \jwasm\wininc\lib\oleauto.lib
    includelib \jwasm\wininc\lib\crtdll.lib
;    includelib \masm32\lib\fpu.lib

;----------------------------------
; «««««««« PROTO «««««««« PROTO «««««««« PROTO «««««««« PROTO «««««««««««««
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
    Main      proto
    copystrng_bffr proto
    copystrng proto
    catstrng  proto
    chrstr    proto
    leftstr   proto
    rightstr  proto
    mid_str   proto
    spacestr  proto
    strsIval  proto
    strsFval  proto
    stringstr proto
    inkeystr  proto
    inputstr  proto
    wherexy   proto
    reset_cursor proto
    get_sys_date proto
    get_sys_time proto
    datestr   proto
    timestr   proto
    closeallfiles proto
    closeafile    proto
    getfilehandle proto
    clearstrng_bffr proto
    setupiobuffer   proto
    mkistr         proto
    mkdstr         proto
    mkqstr         proto
    lsetstr        proto
    rsetstr        proto
    Do_initialize   proto
    clear_allvars   proto
    clearstrvar  proto
    clearintvar  proto
    clearfltvar  proto
    clearLngstrng_bffr proto
    movstrng_bffr  proto
    readintstr   proto
    readfltstr   proto
    readQintstr  proto
    getfilelength  proto
    setcolortext   proto
    dimstrarray    proto
    getArryOffst proto

;jcfuller added
    StdOut proto :DWORD
    StdIn        PROTO :DWORD,:DWORD
    FloatToStr2 proto stdcall fpin:QWORD, szDbl:PTR CHAR
    StrToFloat proto stdcall szIn:PTR BYTE, fpout:PTR DWORD
    malloc PROTO C :VARARG
    free PROTO C :VARARG

; «««««««« MACROS «««««««« MACROS «««««««« MACROS «««««««« MACROS «««««««««
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

ifndef HIWORD
    _hiword macro a
        mov  eax, a
        shr  eax, 16
        and  eax, 0FFFFH
    endm
    HIWORD equ  _hiword
endif
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------
ifndef LOWORD
    _loword macro a
        mov  eax, a
        and  eax, 0FFFFH
    endm
    LOWORD equ  _loword
endif
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------
ifndef max
    max macro a,b
    LOCAL endmax
         mov  eax, a
         mov  ebx, b
         cmp  eax, ebx
         jge  endmax
         mov  eax, ebx
    endmax:
    endm
endif
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------
ifndef min
    min macro a,b
    LOCAL endmin
         mov  eax, a
         mov  ebx, b
         cmp  eax, ebx
         jle  endmin
         mov  eax, ebx
    endmin:
    endm
endif
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------
get MACRO a, b
    push edi
    push ebx
    mov edi, offset a
    mov eax, b
    mov ebx, 4
    mul bl
    add edi, eax
    mov eax, [edi]    ;  mov eax, szLabel+4
    pop ebx
    pop edi
ENDM
;------------------
;USE:
;       mov ndx, 3
;       get szLabel,ndx
;------------------
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------
_conditionl MACRO pa, pb, rc, rd
LOCAL isTrue
LOCAL isDone
  mov  eax, pa   ;tm.tmPitchAndFamily
  and  eax, pb   ;1     ; (tm.tmPitchAndFamily & 1 ? 3 : 2)
  jnz  isTrue
  ;
  mov  eax, rd   ;2
  jmp  isDone
isTrue:
  mov  eax, rc   ;3
isDone:
endm
CondtnlExp   equ _conditionl
;USE:
;  Conditionl var1, var2, result1, result2
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------
_sconditionl MACRO pa, pb, rc, rd
LOCAL isTrue
LOCAL isDone
  mov  eax, pa   ;0x08000000H & lParam ? "Down" : "Up")
  and  eax, pb   ;lParam
  jnz  isTrue
  ;
  mov  eax, rd   ;"Up"
  jmp  isDone
isTrue:
  mov  eax, rc   ;"Down"
isDone:
endm
sCondtnlExp   equ _sconditionl
;USE:
;  sConditionl var1, var2, str1, str2
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------
print MACRO Quoted_Text:VARARG
   LOCAL Txt
      .data
          Txt db Quoted_Text,0
      .code
        invoke StdOut,ADDR Txt
ENDM
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------
printstr    MACRO   stringVar
    invoke StdOut,ADDR stringVar    ; printstr astring
ENDM
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------
printvar    MACRO   reg
    invoke StdOut, reg              ; printstr astring
ENDM
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------
cls     MACRO
    invoke ClearScreen            ; CLS
ENDM
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------


; «««««««««««« STRUCTURES «««««««««« STRUCTURES «««««««««« STRUCTURES «««««
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««


; ««««««««« EQUATES «««««««« EQUATES ««««««««« EQUATES ««««««« EQUATES ««««
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
ifndef BUFFR_SIZ
    BUFFR_SIZ       equ     128
endif
ifndef BUFSIZE
    BUFSIZE         equ     256
endif
ifndef MBUFSIZE
    MBUFSIZE        equ     65535
endif

NUM_ATTRIB    equ     15

;##########################################################################
; «««««««««««« DATA ««««««««« DATA ««««««««« DATA «««««««««« DATA «««««««««
.data
; ««««««««««««CONSTANT ASSIGNMENTS«««««««««««««««««««««««««««««««««««««««««
ff          db  12,0
lf          db  13,10,0     ; line feed
tab         db  9,0         ; tab
n_          dd  10          ; newline
x_          dd  0           ; any character
_Altern_$ DB  'wb+',0      ; alternate I/O Mode
Lprint$     db  'lpt1',0    ; for LPRINT
Lprnmode$   db  'w',0       ; for LPRINT

; «««««««««««««««DO NOT DELETE«««««««««««««««««««««««««««««««««««««««««««««


SteveA

  • Guest
Re: BxbAsm
« Reply #11 on: October 22, 2011, 12:05:09 PM »
Okay, I got it to compile and assemble this sample:
Code: [Select]
CLS
BEEP
PRINT "hello world"
END

using this modified Bxb.inc:
Code: [Select]
;/* BXB.INC */

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
; Include files
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
    include \JWasm\JWasm206\Include\windows.inc
    include \JWasm\JWasm206\Include\CommCtrl.inc
    include \JWasm\JWasm206\Include\commdlg.inc
    include \JWasm\JWasm206\Include\oleauto.inc

;----------------------------------
    ;include \masm32\include\masm32.inc
    ;include \masm32\include\user32.inc
    ;include \masm32\include\gdi32.inc
    ;include \masm32\include\kernel32.inc
    ;include \masm32\include\shell32.inc
    ;include \masm32\include\crtdll.inc
    ;include \masm32\include\fpu.inc

;----------------------------------
    includelib \JWasm\JWasm206\Lib\user32.lib
    includelib \JWasm\JWasm206\Lib\gdi32.lib
    includelib \JWasm\JWasm206\Lib\kernel32.lib
    includelib \JWasm\JWasm206\Lib\Comctl32.lib
    includelib \JWasm\JWasm206\Lib\comdlg32.lib
    includelib \JWasm\JWasm206\Lib\shell32.lib
    includelib \JWasm\JWasm206\Lib\oleaut32.lib
    includelib \JWasm\JWasm206\Lib\crtdll.lib

;----------------------------------
    ;includelib \masm32\lib\masm32.lib
    ;includelib \masm32\lib\fpu.lib

;----------------------------------

It did generate a linker warning, but, it produced an .exe.

jcfuller

  • Guest
Re: BxbAsm
« Reply #12 on: October 22, 2011, 02:30:46 PM »
Steve,
  I'm approaching it a little bit differently.
I am using elf file format to compile the bxbasm generated asm file.
I am not using any of the jwasm library files but instead using the MinGW libraries.
I cheated a bit and compiled a few of the needed items from m32lib and created a gcc compatable
bxbasmlib.

James


My two batch files
console
Code: [Select]
@setlocal
@ECHO OFF
@SET MINGW=C:\MinGW
@SET LIB=%MINGW%\lib -Lc:\jwasm\bxbasm\lib
@SET INCLUDE=%MINGW%\include;%MINGW%\include\sys
@SET PATH=C:\jwasm;C:\jwasm\jwlink;%MINGW%\bin;%PATH%
@SET GCCCFL= --format elf32-i386 --subsystem console
jwasm -elf %1.asm
ld  %GCCCFL% -s -o %1.exe %1.obj -L%LIB% -lbxbasmlib -lmingw32 -lmsvcrt -lkernel32 -luser32 -lgdi32 -lcomctl32 -ladvapi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lwinmm -lcomdlg32 -limagehlp -lversion
REM ECHO All Done
endlocal
gui
Code: [Select]
@setlocal
@SET MINGW=C:\MinGW
@SET LIB=%MINGW%\lib -Lc:\jwasm\bxbasm\lib
@SET INCLUDE=%MINGW%\include;%MINGW%\include\sys
@SET PATH=C:\jwasm;C:\jwasm\jwlink;%MINGW%\bin;%PATH%
@SET GCCCFL= --format elf32-i386 --subsystem windows
@jwasm -elf %1.asm
@ld  %GCCCFL% -s -o %1.exe %1.obj -L%LIB% -lmingw32 -lmsvcrt -lkernel32 -luser32 -lgdi32 -lcomctl32 -ladvapi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lwinmm -lcomdlg32 -limagehlp -lversion
ECHO All Done

Tests.bas
Code: [Select]
'  test.bas  masm32 version 1
'
    DIM array$(3,3,3)
    array$(1,1,1) = "hello"
    array$(2,2,2) = "world!"
    array$(3,3,3) = "yahoo!"
    qaz$ = array$(1,1,1)
    wsx$ = array$(2,2,2)
    edc$ = array$(3,3,3)
    array$(1,1,2) = array$(1,1,1) + CHR$(32) + array$(2,2,2) + " " + array$(3,3,3)
    rfv$ = array$(1,1,2)
'
    PRINT "qaz$=array111", qaz$
    PRINT "wsx$=array222", wsx$
    PRINT "edc$=array333", edc$
    PRINT "rfv$=all above", rfv$
    PRINT array$(1,1,1) + array$(2,2,2) + array$(3,3,3) + array$(1,1,2)
'
    val = ASC(array$(1,1,1))
    len = LEN(array$(1,1,1))
    PRINT "val= "; val, "len= "; len
    val = ASC(array$(2,2,2))
    len = LEN(array$(2,2,2))
    PRINT "val= "; val, "len= "; len
    val = ASC(array$(3,3,3))
    len = LEN(array$(3,3,3))
    PRINT "val= "; val, "len= "; len
    val = ASC(array$(1,1,2))
    len = LEN(array$(1,1,2))
    PRINT "val= "; val, "len= "; len
'
    array$(1,1,3) = "100.123456"
    val# = VAL(array$(1,1,3))
    PRINT "val= "; val#
    '
TheEnd:
' ------------------------------------------
  END
' ------------------------------------------





BXB.INC

Code: [Select]
;/* BXB.INC */

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
; Include files
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

    include \jwasm\wininc\include\windows.inc
    include \jwasm\wininc\include\Commctrl.inc
    include \jwasm\wininc\include\commdlg.inc
    include \jwasm\wininc\include\shellapi.inc
    include \jwasm\wininc\include\oleauto.inc
;    include \jwasm\wininc\include\crtdll.inc
;    include \masm32\include\fpu.inc

;----------------------------------
; «««««««« PROTO «««««««« PROTO «««««««« PROTO «««««««« PROTO «««««««««««««
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
    Main      proto
    copystrng_bffr proto
    copystrng proto
    catstrng  proto
    chrstr    proto
    leftstr   proto
    rightstr  proto
    mid_str   proto
    spacestr  proto
    strsIval  proto
    strsFval  proto
    stringstr proto
    inkeystr  proto
    inputstr  proto
    wherexy   proto
    reset_cursor proto
    get_sys_date proto
    get_sys_time proto
    datestr   proto
    timestr   proto
    closeallfiles proto
    closeafile    proto
    getfilehandle proto
    clearstrng_bffr proto
    setupiobuffer   proto
    mkistr         proto
    mkdstr         proto
    mkqstr         proto
    lsetstr        proto
    rsetstr        proto
    Do_initialize   proto
    clear_allvars   proto
    clearstrvar  proto
    clearintvar  proto
    clearfltvar  proto
    clearLngstrng_bffr proto
    movstrng_bffr  proto
    readintstr   proto
    readfltstr   proto
    readQintstr  proto
    getfilelength  proto
    setcolortext   proto
    dimstrarray    proto
    getArryOffst proto

;jcfuller added
    StdOut proto :DWORD
    StdIn        PROTO :DWORD,:DWORD
    FloatToStr2 proto stdcall fpin:QWORD, szDbl:PTR CHAR
    StrToFloat proto stdcall szIn:PTR BYTE, fpout:PTR DWORD
    malloc PROTO C :VARARG
    free PROTO C :VARARG

; «««««««« MACROS «««««««« MACROS «««««««« MACROS «««««««« MACROS «««««««««
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

ifndef HIWORD
    _hiword macro a
        mov  eax, a
        shr  eax, 16
        and  eax, 0FFFFH
    endm
    HIWORD equ  _hiword
endif
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------
ifndef LOWORD
    _loword macro a
        mov  eax, a
        and  eax, 0FFFFH
    endm
    LOWORD equ  _loword
endif
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------
ifndef max
    max macro a,b
    LOCAL endmax
         mov  eax, a
         mov  ebx, b
         cmp  eax, ebx
         jge  endmax
         mov  eax, ebx
    endmax:
    endm
endif
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------
ifndef min
    min macro a,b
    LOCAL endmin
         mov  eax, a
         mov  ebx, b
         cmp  eax, ebx
         jle  endmin
         mov  eax, ebx
    endmin:
    endm
endif
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------
get MACRO a, b
    push edi
    push ebx
    mov edi, offset a
    mov eax, b
    mov ebx, 4
    mul bl
    add edi, eax
    mov eax, [edi]    ;  mov eax, szLabel+4
    pop ebx
    pop edi
ENDM
;------------------
;USE:
;       mov ndx, 3
;       get szLabel,ndx
;------------------
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------
_conditionl MACRO pa, pb, rc, rd
LOCAL isTrue
LOCAL isDone
  mov  eax, pa   ;tm.tmPitchAndFamily
  and  eax, pb   ;1     ; (tm.tmPitchAndFamily & 1 ? 3 : 2)
  jnz  isTrue
  ;
  mov  eax, rd   ;2
  jmp  isDone
isTrue:
  mov  eax, rc   ;3
isDone:
endm
CondtnlExp   equ _conditionl
;USE:
;  Conditionl var1, var2, result1, result2
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------
_sconditionl MACRO pa, pb, rc, rd
LOCAL isTrue
LOCAL isDone
  mov  eax, pa   ;0x08000000H & lParam ? "Down" : "Up")
  and  eax, pb   ;lParam
  jnz  isTrue
  ;
  mov  eax, rd   ;"Up"
  jmp  isDone
isTrue:
  mov  eax, rc   ;"Down"
isDone:
endm
sCondtnlExp   equ _sconditionl
;USE:
;  sConditionl var1, var2, str1, str2
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------
print MACRO Quoted_Text:VARARG
   LOCAL Txt
      .data
          Txt db Quoted_Text,0
      .code
        invoke StdOut,ADDR Txt
ENDM
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------
printstr    MACRO   stringVar
    invoke StdOut,ADDR stringVar    ; printstr astring
ENDM
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------
printvar    MACRO   reg
    invoke StdOut, reg              ; printstr astring
ENDM
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------
cls     MACRO
    invoke ClearScreen            ; CLS
ENDM
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------
; ««««««««««««««««««««««««««««««««««««««««
;-----------------------------------------


; «««««««««««« STRUCTURES «««««««««« STRUCTURES «««««««««« STRUCTURES «««««
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««


; ««««««««« EQUATES «««««««« EQUATES ««««««««« EQUATES ««««««« EQUATES ««««
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
ifndef BUFFR_SIZ
    BUFFR_SIZ       equ     128
endif
ifndef BUFSIZE
    BUFSIZE         equ     256
endif
ifndef MBUFSIZE
    MBUFSIZE        equ     65535
endif

NUM_ATTRIB    equ     15

;##########################################################################
; «««««««««««« DATA ««««««««« DATA ««««««««« DATA «««««««««« DATA «««««««««
.data
; ««««««««««««CONSTANT ASSIGNMENTS«««««««««««««««««««««««««««««««««««««««««
ff          db  12,0
lf          db  13,10,0     ; line feed
tab         db  9,0         ; tab
n_          dd  10          ; newline
x_          dd  0           ; any character
_Altern_$ DB  'wb+',0      ; alternate I/O Mode
Lprint$     db  'lpt1',0    ; for LPRINT
Lprnmode$   db  'w',0       ; for LPRINT

; «««««««««««««««DO NOT DELETE«««««««««««««««««««««««««««««««««««««««««««««


SteveA

  • Guest
Re: BxbAsm
« Reply #13 on: October 22, 2011, 06:41:17 PM »
Wow !
This looks great, James.
My hat's off to you. You know this conversion process way better than I do.

Question: what MinGW files are you using ?
My MinGW is a bit dated and I only have ".h" (include) and ".a" (lib) files.

What's the advantage of "elf" files ?
I understand the reasoning for Linux, but, I thought your example was Win.
« Last Edit: October 22, 2011, 06:47:43 PM by SteveA »

jcfuller

  • Guest
Re: BxbAsm
« Reply #14 on: October 23, 2011, 03:47:35 AM »
Steve,
  I was using 4.4.1 but just this am downloaded 4.6.1 and it seems to work fine.
I use the web installer to handle all my many versions on my computer.
It recommends not installing to MinGW directory so I add the version -> MinGW461.
This is the web installer.
http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm-gcc-webdl.exe/download
Run it as administrator and install the 32bit (top selection) version. I deselect the last two options.
Because I use a couple different ones I never have the path in my global environment path. Always set via bat files.

Re: -elf
I believe (?) this is the default for MinGW. If you look at the jwasm gtk01.asm example you'll see japeth uses that
so I assumed MinGw also uses it as default. Another hint is you cannot use visual c obj files with MinGW.

There is a huge amount of work to make the output of BxbAsm cross platform. I spent weeks trying to get cross platform console/terminal working in Ubx.

James