flat assembler
Message board for the users of flat assembler.

Index > Main > Microsoft's opensouce GW-BASIC (and MS-DOS 2.0)

Author
Thread Post new topic Reply to topic
redsock



Joined: 09 Oct 2009
Posts: 430
Location: Australia
redsock 22 May 2020, 03:22
How hard would it be to get fasmg to actually compile this? Smile

https://github.com/microsoft/GW-BASIC/blob/master/GWMAIN.ASM

Announcement: https://devblogs.microsoft.com/commandline/microsoft-open-sources-gw-basic/
Quote:
BILL GATES WROTE A LOT OF STUFF.
PAUL ALLEN WROTE A LOT OF OTHER STUFF AND FAST CODE.
MONTE DAVIDOFF WROTE THE MATH PACKAGE (F4I.MAC).
So very cool.

_________________
2 Ton Digital - https://2ton.com.au/
Post 22 May 2020, 03:22
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 22 May 2020, 04:54
redsock wrote:
How hard would it be to get fasmg to actually compile this? Smile

While that other thread established how such things might be possible (and probably even more so with help of CALM), I am probably the only one that could be willing to attempt such crazy thing. And I feel like I have done too many of them already. Wink
Post 22 May 2020, 04:54
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4020
Location: vpcmpistri
bitRAKE 22 May 2020, 10:15
So impatient, they could've waited for the 40 year anniversary. Very Happy

The dialect looks close to MASM, but it's ASM86 - which is the assembler made by Intel.
https://software.intel.com/en-us/forums/intel-c-compiler/topic/672355
https://github.com/ogdenpm/intel80tools/tree/master/msdos

A wonderful collection of very early (1973) assembly language manuals from Intel:
http://www.nj7p.info/Manuals/Intel_Manuals1.php

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 22 May 2020, 10:15
View user's profile Send private message Visit poster's website Reply with quote
guignol



Joined: 06 Dec 2008
Posts: 763
guignol 08 Jun 2020, 10:07
HA-HA!
haha, microsoft, that is
Post 08 Jun 2020, 10:07
View user's profile Send private message Reply with quote
guignol



Joined: 06 Dec 2008
Posts: 763
guignol 08 Jun 2020, 10:14
but what really would have been nice, is if fasm was commented completely
Post 08 Jun 2020, 10:14
View user's profile Send private message Reply with quote
FlierMate2



Joined: 21 Mar 2023
Posts: 39
FlierMate2 18 May 2023, 15:26
Learned something new in the GW-BASIC code.

Code:
...
...
   jnz   $ + 3
   ret
....
...
    


So I don't need to create another branch, can jump to the code after "ret". Am I correct?
Post 18 May 2023, 15:26
View user's profile Send private message Reply with quote
macomics



Joined: 26 Jan 2021
Posts: 926
Location: Russia
macomics 18 May 2023, 16:59
16- and 32-bit
Code:
...
    push end_if
    test al, 1 ; 0xA8 0x01
    jnz $ + 3 ; 0x75 0x03
    ret ; 0xC3
; then begin // if al and 1
...
end_if:
...

; or

...
    push end_if
    test al, 1 ; 0xA8 0x01
    jnz $ + 5 ; 0x75 0x05
    ret 0; 0xC2 0x00 0x00
; then begin // if al and 1
...
end_if:
...    


64-bit
Code:
...
    lea r8, [end_if]
    push r8
    test al, 1 ; 0xA8 0x01
    jnz $ + 3 ; 0x75 0x03
    ret ; 0xC3
; then begin // if al and 1
...
end_if:
...

; or

...
    lea r8, [end_if]
    push r8
    test al, 1 ; 0xA8 0x01
    jnz $ + 5 ; 0x75 0x05
    ret 0 ; 0xC2 0x00 0x00
; then begin // if al and 1
...
end_if:
...    
Post 18 May 2023, 16:59
View user's profile Send private message Reply with quote
FlierMate2



Joined: 21 Mar 2023
Posts: 39
FlierMate2 18 May 2023, 17:19
Thanks macomics.
Post 18 May 2023, 17:19
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.