Image Map Image Map
Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 42

Thread: Floating point info code for 8088 wanted

  1. #21
    Join Date
    May 2009
    Blog Entries


    If it is going into an interpreter, speed probably won't be critical but size might. The OP hasn't mentioned how limited is the 8088 system the code needs to run on.

  2. #22


    Quote Originally Posted by krebizfan View Post
    I don't know how long the OP plans to take before having code that can be shown to others.
    Because it are fun projects and having a job, a family, etc. progress is slow. So it could take years before having a working result. The state of the various projects:
    - My OS: it boots and you can load and run some programs. It has its own file system (was more fun than working with FAT) and at the moment I'm implementing directories.
    - BASIC: it starts up and you can enter lines. It has a screen editor like the various Commodores. I just started to implement the various commands. But that means I need to be able to handle variables as well. Therefore this request for FP pointers.
    - Pascal: it converts Pascal code into a file with macros. An assembler should turn the macros into a working program. The major task is to fill in all those macros. So far I'm able to create very simple programs (just some Writelns), that are able to run under my OS, under DOS and on a C64. And that by adding a directive in the Pascal code that tells the compiler what directives to add to the source code for the assembler. These directives tell the assembler for what CPU the code is meant and which files to use that contain the actual macro definitions.
    I have disassembled Turbo Pascal 3 but I still don't understand completely how it generates the executable. My approach is may be excessive but quite understandable.

    FYI: all the sources are free and can be get by emailing me. There is only an eeny teeny problem: I know I have some documentation somewhere. But if there is really interest, I'll look it up and update it.
    With kind regards / met vriendelijke groet, Ruud Baltissen

  3. #23
    Join Date
    Jan 2005
    Principality of Xeon (NJ)


    Is the intent to embed this in roms eventually?

    Somewhere in my stash I have the firmware to an old robot brain project. There was supposed to be a basic iirc. There should be a forth interpreter. I'll send you that when I dig it out.

  4. #24


    Quote Originally Posted by krebizfan View Post
    Bywater Basic is a portable open source BASIC interpreter written in C.
    Which means that all FP routines are taken care of by the C compiler. Or am I overlooking something?
    With kind regards / met vriendelijke groet, Ruud Baltissen

  5. #25


    Quote Originally Posted by Chuck(G) View Post
    Thank you!
    With kind regards / met vriendelijke groet, Ruud Baltissen

  6. #26


    Quote Originally Posted by krebizfan View Post
    PC Tech Journal did a three part article on floating point math with code written in 8086 assembly. That would be OCT thru DEC 1984 issues. Only the first part is available online
    All three parts are online:

    Pt. 1 -
    Pt. 2 -
    Pt. 3 - :: :: :: blog

  7. #27


    Quote Originally Posted by krebizfan View Post
    The OP hasn't mentioned how limited is the 8088 system the code needs to run on.
    Sometimes things are so obvious for yourself that you forget that they are not for others.

    It is meant to run on an IBM-PC (compatible) system with at least 64 KB. But I intend to store variables in the way Pascal and C do: reserving fixed sizes of data. The advantages: no garbage collection and easier to program. The disadvantage: 64 KB limits the size of programs. So that's why I also decided to reserve 64 KB for data and 64 KB for the program. And that should be able to run on a 256 KB system.

    Having 640 KB systems, eventually I want to support the use of multi-segments for the data and program but to be honest, I have no real idea yet how to take care of that in assembly. One idea is to use a look-up table: a pointer behind the name of the variable point to the location where to find the data. But I'm only thinking about using that for arrays and strings. A table can also tell the interpreter in what segment to look for a certain line.
    With kind regards / met vriendelijke groet, Ruud Baltissen

  8. #28


    Quote Originally Posted by KC9UDX View Post
    If you're going to do this just like Commodore BASIC, you will evaluate all numbers as floating point,
    I was thinking about handling integers as integers, including their own mathematical routines. The advantage: easier and faster, the disadvantage: more code.

    [/QUOTE]As far as transcendental functions, I've always used look-up tables. I thought Commodore BASIC did this too. But it's been a very long time since I perused the code.[/QUOTE]
    Having no other examples how it is done, I will do it as Commodore did it. And after reading the above comments I don't see any reason why I must stick to the 32 or 64 bits precision so I use the 40 bits used by Commodore as well.
    With kind regards / met vriendelijke groet, Ruud Baltissen

  9. #29


    Quote Originally Posted by tipc View Post
    and I would assume M$ basic is acceptably good (ducks), why not just modify that to suit your liking.
    To be able to modify it, you need the sources. Or am I missing something? And I don't have these sources. I did quite some Google to find them but I haven't found anything written in 80x86 assembly yet except PATB. If you have it and would want to share it with me, I would be grateful!
    With kind regards / met vriendelijke groet, Ruud Baltissen

  10. #30


    I would use separate routines for integers, too. I never use floating point for anything that I can recall, so I would finish everything before adding floating point routines, and in my case probably never get round to adding them and be happy without them, anyway. But if you're going to run programs written for floating point implementations, you're going to need it.

    Your projects and your situation sound exactly like mine. The first time I wrote my 65xx assembler project, it took me maybe 6 months. Having full time responsibilities these days, I think it took me 6 years. I've been planning my own Pascal compiler for decades. I have doubts that I'll ever get that done.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts