Author Topic: AsmJunkError  (Read 6535 times)

0 Members and 1 Guest are viewing this topic.

Peter

  • Guest
AsmJunkError
« on: December 09, 2011, 12:24:04 PM »
Deleted..
« Last Edit: May 05, 2015, 12:08:47 PM by Peter »

Charles Pegge

  • Guest
Re: AsmJunkError
« Reply #1 on: December 09, 2011, 02:26:45 PM »
Hi Peter,

Is that a 64-bit circle? :)


on the Asm clip:

I removed the <--- junk  and it worked!

Code: [Select]
sys Tx,x,y

   mov   [y],0
.A mov   [x],0
.B mov   ecx,[y]
   mov   edx,[Tx]
   imul  ecx,edx
   add   ecx,[x]
   mov   eax,3
« Last Edit: December 09, 2011, 02:31:00 PM by Charles Pegge »

Charles Pegge

  • Guest
Re: AsmJunkError
« Reply #2 on: December 09, 2011, 04:00:33 PM »

Your clues are too cryptic for me.

JRS

  • Guest
Re: AsmJunkError
« Reply #3 on: December 09, 2011, 07:08:36 PM »
It would be a big help to Charles if we can keep games separate from bug reports.
 




Aurel

  • Guest
Re: AsmJunkError
« Reply #4 on: December 10, 2011, 03:09:42 AM »
And would be helpful if all 64 bit examples be separated.
I really don't know why insist on 64bit version.
Only because memory consuption advantage,right?
Afterall all 32bit programs work on 64 bit windows,right?
And i really doubt that someone here need 2gb for program.

Charles Pegge

  • Guest
Re: AsmJunkError
« Reply #5 on: December 10, 2011, 03:20:30 AM »

Yes I agree Aurel, 32bits seems an optimal size for most programs. Some server applications benefit from the larger address space and the wide registers size helps with hash coding and encryption.

The Basic examples I've reworked will work as 32 or 64 bit binaries. Only the run-time library changes.

Charles

Charles Pegge

  • Guest
Re: AsmJunkError
« Reply #6 on: December 10, 2011, 07:14:25 AM »
Peter,

I think that the line number / error is wrongly attributed to RTL64. That is why more information would helpful.

Similarly I cannot reproduce the problem you get with the dot labels.

Charles

Charles Pegge

  • Guest
Re: AsmJunkError
« Reply #7 on: December 10, 2011, 08:55:08 AM »
Yes stay with dotted labels. The colon is interpreted as a delimiter when a statement follows on the same line.

Avoid using terminate. This is a macro to release program resources. It is only necessary in a customised Finish procedure (used in DLLs etc).
Otherwise the compiler inserts it automatically.

This works with RTLs

Code: [Select]
$filename "t.exe"
#include "RTL64.inc" 'add path if required
  sys   iEax
   mov   eax,100
   mov   edx,100
   mov   ecx,50
   sub   eax,ecx
   add   eax,edx
   cmp   eax,50
   jz    A
   mov   eax,15
   rol   eax,4
   mov   edx,eax
   jmp   B
.A mov   iEax,eax
   print iEax
   jmp fwd C
.B movzx rax, eax
   mov   iEax,eax
   print iEax
   jmp fwd C
.C

Charles
« Last Edit: December 10, 2011, 08:56:49 AM by Charles Pegge »

Charles Pegge

  • Guest
Re: AsmJunkError
« Reply #8 on: December 10, 2011, 10:01:25 AM »

I don't know what is causing it Peter. Could you try the latest in-progress version, I have just posted a new one.

Charles

Charles Pegge

  • Guest
Re: AsmJunkError
« Reply #9 on: December 10, 2011, 12:34:18 PM »

Peter,

I can't do anything with the binaries.

If you are using any 32bit assembler techniques in a 64bit system, expect trouble!
The calling convention and demand for 16 byte stack pointer alignment make it a very different place.


One of your demos below compiles successfully to 64bit binary using an amended version of your window64.h / Window.h

This, I have included with a suite of your programs in projects/GDIWindows/. I try to ensure that these programs work correctly with each release.

Code: [Select]
$ Filename "t.exe"
#include "..\..\inc\RTL64.inc"
indexbase 0
include "window64.h"

SetWindow "Load Check",320,240,w_2
Font 12,24,700,"courier"

dim map(108) as byte
sys x, loaded
loaded = LoadFile "maps/map1-1.bin", map
string s="Loaded= " + loaded
Text 0,0,s,white
WaitKey(32)

While Esckey()=0
cls 0
for x=0 to 8
   Text 0,x*24,"map" + x + "= " + map(x),white
next
DoEvents
SwapBuffers
Wend
WinEnd

Charles

efgee

  • Guest
Re: AsmJunkError
« Reply #10 on: December 12, 2011, 12:41:38 PM »
And would be helpful if all 64 bit examples be separated.
I really don't know why insist on 64bit version.
Only because memory consuption advantage,right?
Afterall all 32bit programs work on 64 bit windows,right?
And i really doubt that someone here need 2gb for program.

Aurel,
if done right all examples should work on 32 or 64 bit.
The only need would be to change the runtime from RTL32 to RTL64.

No more no less.

If you look at C/C++ compilers they all have one set of include files because they work with both set of libraries (32 and 64 bit).

Oxygen can work the same.

Besides, computers nowadays come with Windows7-64bit pre-installed. 32bit programs run on it because there is a software layer that makes it happen. Because of that, 32bit programs are slightly slower on a 64bit OS than on a 32bit OS.

As a side note:
How many 32bit-only Basic compilers are actively developed today?

XBlite has a handful of users but no real community. (Windows 32bit only)
FreeBasic is adding a C emitter in order to create 64 bit apps. (Dos/Windows/Linux/BSD 32bit only)
IBasic/EBasic have a handful of users and a community (Windows 32bit only) but the creator of these languages jumped ship to .NET.
etc.

Because Oxygen creates machine code it's tight to x86/x64 platforms; so serving 32/64 bit Windows/Linux would inhibit Oxygen to gain more users, build a community, survive and stay active in the long run.

my $0.02

Aurel

  • Guest
Re: AsmJunkError
« Reply #11 on: December 13, 2011, 02:42:17 AM »
Where you find Xblite?
Xblite even don't look like basic.And because of syntax complexity is not very
much popular at all.
IWBasic original author is not jump to .NET (Nova language-development on ice)
He work on MiniBASIC which is 32bit only for now.Long story....
PureBasic for now is only 32bit to.
etc..etc...

I don't tell that 64bit version is worthwhile.
And i really doubt that 64bit version will attract more people to OxygenBasic.
Basic - today ,is on the edge...

Charles Pegge

  • Guest
Re: AsmJunkError
« Reply #12 on: December 13, 2011, 06:05:34 AM »

DLL developers need 64 bit compiling when their products are to be used by 64 bit applications.
Patrice Terrier develops modules for WinDev for example, and had to port some of his code from PB to C++ for this reason.

Charles

efgee

  • Guest
Re: AsmJunkError
« Reply #13 on: December 13, 2011, 10:03:13 AM »
Where you find Xblite?
Xblite even don't look like basic.And because of syntax complexity is not very
much popular at all.

The only difference to traditional BASIC is that the type is in front of the variable name.
Other than that it's OK. Feels somewhat C-ish, but so can OxygenBasic...

IWBasic original author is not jump to .NET (Nova language-development on ice)
He work on MiniBASIC which is 32bit only for now.Long story....

So he stopped this compiler as well? I'm not really up to speed with all this...

PureBasic for now is only 32bit to.

This is not the case that's why I didn't list it...

PureBasic is Windows/Linux/OSX 32bit AND 64bit. (It even has an Amiga version  :P )
You pay once and can download all versions you want and have lifetime updates/upgrades.  8)
The syntax is not really traditional BASIC, it's BASIC-like.

Aurel, if you are a PureBasic user and need 64bit compiler just download it...  ;D

...Basic - today ,is on the edge...

On the edge to what? Extinction?


Take care
« Last Edit: December 13, 2011, 10:06:33 AM by efgee »

efgee

  • Guest
Re: AsmJunkError
« Reply #14 on: December 13, 2011, 10:05:24 AM »
Patrice Terrier develops modules for WinDev for example, and had to port some of his code from PB to C++ for this reason.

You talk about PowerBasic?

(not PureBasic...)