Code Monkey home page Code Monkey logo

rtools's Introduction

RTools

This is MS-DOS tools for linking RDF/RDL files. While playing with small compilers, I noticed one problem for all beginners. It lacks runtime-libraries and linkers support.

I investigate the OBJ/OMF format and found it too complicated. AOUTB has no segment memory support. COFF and ELF are also complex and solve problems non-relevant to MS-DOS.

By chance, I meet the RDOFF2 format from NASM - a beautiful and simple format for object modules.

This repository contains tools for working with RDOFF2 (and source code) to help you build small compilers.

RDF - NASM builtin format RDOFF2 for object files. Different version of Nasm works different with this files. So, I strongly advise to use NASM version 0.98.39. See DOC\RDOFF2.TXT and source code.

RDL - Again, NASM-format but for libraries.

  • nasm - version 0.98.39, just recompiled for MS-DOS (no DPMI) with RDF support (by default - is disabled). No other changes.
  • rdfdump - dump utility
  • rlib - library manager
  • rlink - linker itself

RLINK

RLINK can generate huge files. To speed up RLINK - point your TMP/TEMP directory to ramdrive. So, don't be confused with dos 16-bit application - RLINK known how to handle more then 64kb and 640kb :).

Supported output formats

  • COM - simple MS-DOS .com file
  • MZS - MS-DOS exe, small memory model (CS = code, DS = data,bss,stack)
  • MZL - MS-DOS exe, large memory model (each rdf have own CS, DS and BSS segment)
  • ADAM - DOS32 Extender.
  • LX - OS/2 and DPMI exe file.
  • PE - DOS PE32 file (PE32 without imports).
  • RDF - Linked rdf into one code-segment (like a .com, but with zero offset and name). Could be used as DLL. If you load code segment at ????:0000 - you don't need process relocations. And, as bonus, you can use symbol table.

Builtin stubs and extenders

  • Simple stub (will write something like "This is dpmi exe!"). Can be used with HX-DOS Extender or with LX format (if you want bind other DOS-Extender).
  • Loader DOS32 Extender (for ADAM)
  • ZRDX DOS-Extender (for LX)
  • Loader HX-DOS Extender (for PE).

If you need viewer for RDF, please visit to https://github.com/DosWorld/objview

"Make" utility available at https://github.com/DosWorld/smallmake

How to use

See MAKEFILE in TEST directory.

Dependencies

Requires System2 library:

https://github.com/DosWorld/libsystem2

Build

You need Turbo Pascal, System2 library and "make" in path. Just type:

    cd src
    make

License

NASM version 0.98.39 binaries distributed with own different license and copyright-holders (see DOC\NASMLIC.TXT, GNU LGPL).

MIT License

rtools's People

Contributors

dosworld avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.