flat assembler
Message board for the users of flat assembler.

Index > DOS > FASMD - early preview

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 03 Dec 2006, 23:11
My long time ago promised tribute to my favorite operating system is finally near to the useful state, and thus I decided to make a pre-release for the members of the board to try it.

It is, as you may guess from the name, the equivalent of FASMW for DOS. In fact, they share the same editor control, since when I designed the editor's core, I had in plan to make it portable to different operating systems, just as the assembler's core. Well, with editor the thing is a bit harder and more things have to be re-done in the OS-dependent interface, but FASMD shows that it's still possible. Its interface part re-uses some pieces of code from my very old "flat editor" project, BTW.

FASMD runs in protected mode and uses DPMI 0.9 for this purpose, so if your DOS doesn't support DPMI, you need to use some third-party DPMI server, I can recommend CWSDPMI for this purpose.

Since they are based on the same core, the "feel" of both editors is very similar, and they share the most of the keyboard commands. The FASMD has for now persistently enabled some of the editor's options, in future they will be customizable, as in FASMW. Also some of the windows, like opening a file or entering a text to find, are not yet ready in this pre-release, and are replaced with very ordinary substitutes, just to allow you to enter some text for testing.

As this program has not yet been throughfully tested, please use it with caution.


PS. The editor's core still needed a few corrections and FASMW has also been updated with a new one. All the common editor files that are used by both FASMW and FASMD reside directly in the SOURCE\IDE directory, while system-dependent interfaces are in its subdirs.

PS2. No, I don't yet have a plans for FASMX.


Attachment removed - FASMD is a part of DOS distribution now.


Last edited by Tomasz Grysztar on 19 Dec 2006, 21:27; edited 1 time in total
Post 03 Dec 2006, 23:11
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 04 Dec 2006, 03:21
Cool beans! (BTW, I figure a picture is worth a thousand words ... I often like it when I can see what it is people are talking about).


Description:
Filesize: 6.08 KB
Viewed: 16727 Time(s)

fasmdpre.jpg


Post 04 Dec 2006, 03:21
View user's profile Send private message Visit poster's website Reply with quote
sylwek32



Joined: 27 Apr 2006
Posts: 339
sylwek32 04 Dec 2006, 05:48
Nice Tomasz!
Wszystko ok tylko troche dzikie kolory Very Happy
Post 04 Dec 2006, 05:48
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 04 Dec 2006, 07:32
The color theme is the same one I've been using in DOS Navigator for years, and it's a slight variation on standard DN's colors (including those for asm highlighting).
Post 04 Dec 2006, 07:32
View user's profile Send private message Visit poster's website Reply with quote
Tommy



Joined: 17 Jun 2003
Posts: 489
Location: Norway
Tommy 04 Dec 2006, 08:58
Cool Tomasz! Will there be such an alternative for Linux as well??
Post 04 Dec 2006, 08:58
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 04 Dec 2006, 09:09
See my PS2 above. Wink
Post 04 Dec 2006, 09:09
View user's profile Send private message Visit poster's website Reply with quote
Tommy



Joined: 17 Jun 2003
Posts: 489
Location: Norway
Tommy 04 Dec 2006, 14:33
Ah.. :$ Think I better read more carefully next time... Razz
Post 04 Dec 2006, 14:33
View user's profile Send private message Visit poster's website Reply with quote
Goplat



Joined: 15 Sep 2006
Posts: 181
Goplat 05 Dec 2006, 15:55
I noticed a few bugs using this on my DOS machine. First, the characters to the left and right of the time don't get replaced with space (they retain whatever character was there before fasmd started). Next, the file loader doesn't properly terminate the file in memory - if you edit a larger file, quit, then edit a smaller one, you end up with part of the large file added on to the small one. Last and worst, if the get_memory function fails it returns without popping EDI and ESI first; this one made it impossible to compile.
Post 05 Dec 2006, 15:55
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 05 Dec 2006, 16:17
Thanks for testing. All those were a quick fixes, the attachment above is updated.
Post 05 Dec 2006, 16:17
View user's profile Send private message Visit poster's website Reply with quote
Japheth



Joined: 26 Oct 2004
Posts: 151
Japheth 06 Dec 2006, 09:17
Works, thanks! I would appreciate, however, if FASMD is able to use the full text-screen. I run DOS (and full-screen DOS-Boxes) usually with 34 text lines, in 640x480 resolution, with a text font size of 14. Just in case: the number of rows-1 can be found in BIOS vars (40h:0084h, type BYTE).
Post 06 Dec 2006, 09:17
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 07 Dec 2006, 14:03
Oh, really? This is very nice...its like the old days again Smile
Post 07 Dec 2006, 14:03
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 07 Dec 2006, 20:50
Japheth, does that work in XP? My brief tests failed, so maybe I did it wrong. Razz
Post 07 Dec 2006, 20:50
View user's profile Send private message Visit poster's website Reply with quote
Tommy



Joined: 17 Jun 2003
Posts: 489
Location: Norway
Tommy 07 Dec 2006, 22:50
@Tomasz: will it be much to do porting it to Linux? if now, I think I've found a new project to work on :p
Post 07 Dec 2006, 22:50
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 08 Dec 2006, 09:34
Well, there's is quite a bit of work, because the whole interface of the editor has to be re-written. If you're still interested Wink and want some details, please contact me.
Post 08 Dec 2006, 09:34
View user's profile Send private message Visit poster's website Reply with quote
Japheth



Joined: 26 Oct 2004
Posts: 151
Japheth 08 Dec 2006, 11:30
> Japheth, does that work in XP? My brief tests failed, so maybe I did it wrong.

But what did you test? that at 40:0084h is indeed the value for rows-1? That is valid for NTVDM as well. Indeed the NTVDM VGA emulation is not that bad, even the CRT port values are correct.
Post 08 Dec 2006, 11:30
View user's profile Send private message Reply with quote
RedGhost



Joined: 18 May 2005
Posts: 443
Location: BC, Canada
RedGhost 08 Dec 2006, 11:31
I'll have to re-install freeDOS to give her a test go.

_________________
redghost.ca
Post 08 Dec 2006, 11:31
View user's profile Send private message AIM Address MSN Messenger Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 08 Dec 2006, 14:38
About porting to Linux, please select the names carefully, FASMX will be the TTY version or the X Windows version?
Post 08 Dec 2006, 14:38
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 08 Dec 2006, 14:43
The TTY version would be called FASMT. Wink
Post 08 Dec 2006, 14:43
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 08 Dec 2006, 14:55
I like that name Wink

[edit]And the Win32 console version FASMC?Razz[/edit]
Post 08 Dec 2006, 14:55
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 09 Dec 2006, 14:09
Added a bit of customizability at source level (search for the "Configuration" in the FASMD.ASM). In future there will be perhaps .INI file like in case of FASMW, for now you can just configure by recompiling (not really a bad thing for a programmer).

For some advanced tweaks: there's a "set_video_mode" routine, which looks like this:
Code:
    set_video_mode:
        mov     ah,0Fh
        int     10h
        cmp     al,3
        je      video_mode_ok
        mov     ax,3
        int     10h
    video_mode_ok:
        ret    

You can try changing the text mode that FASMD uses by playing with this function. For example add a call to function 1112h of video BIOS interrupt to set 80x50 (with awful 8x8 font), or try the below extension to set the VGA 80x30 mode (I really like this one):
Code:
    set_video_mode:
        mov     ah,0Fh
        int     10h
        cmp     al,3
        je      video_mode_ok
        mov     ax,3
        int     10h
    video_mode_ok:

; The code below is taken from the small program that comes with DOS Navigator source distribution (originally in TASM)
    macro outb v1,v2
    {
       mov   al,v1
       out   dx,al
       mov   al,v2
       inc   dx
       out   dx,al
       dec   dx
    }

    macro outv v
    {
        mov     al,v
        out     dx,al
    }

        cli
        mov     dx,3C4h
        outb    0,1

        mov     dx,3D4h
        outv    23
        inc     dx
        in      al,dx
        and     al,127
        out     dx,al
        dec     dx

        outv    17
        inc     dx
        in      al,dx
        and     al,127
        out     dx,al

        mov     dx,3CCh
        in      al,dx
        or      al,192
        mov     dx,3C2h
        out     dx,al

        mov     dx,3D4h

        outb    6,11
        outb    7,62
        outb    9,79
        outb    16,234
        outb    17,140
        outb    18,223
        outb    21,231
        outb    22,4

        outv    17
        inc     dx
        in      al,dx
        or      al,128
        out     dx,al
        dec     dx

        outv    23
        inc     dx
        in      al,dx
        or      al,128
        out     dx,al
        mov     dx,3C4h
        outb    0,3

        sti
        mov     byte [fs:84h],29 ; put the right value into 40h:84h
        retn    


Last edited by Tomasz Grysztar on 10 Dec 2006, 00:30; edited 1 time in total
Post 09 Dec 2006, 14:09
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< 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.