Важная информация
Страница 1 из 2 12 ПоследняяПоследняя
Показано с 1 по 10 из 19

Тема: z88dk v1.99A Release Candidate

  1. #1

    По умолчанию z88dk v1.99A Release Candidate

    Download from:

    The release candidate will be available for testing until December 23 when it will be replaced by an official release of v1.99A.

    The download options are a binary win32 build, a binary mac osx build and a generic source tree for other platforms. Installation hints can be found here: http://www.z88dk.org/wiki/doku.php?i...t#installation. Instructions for installing the MacOSX binary are missing so if a MacOSX user is able to submit those, it would be appreciated

    z88dk has undergone some significant development in the past two years. The version number reflects this (v1.99) and anticipates a v2.0 when the development roadmap is completed.


    Quite a lot and we don't have a complete list of changes yet.

    In broad terms:

    * [z80asm] Sections introduced for creating memory maps and compiling for bankswitched memory
    * [z80asm] Modern operator syntax introduced
    * [z80asm] PUBLIC, EXTERN, GLOBAL scoping keywords introduced to replace XDEF, XREF, XLIB, LIB, etc

    * [sccz80] Numerous bugfixes

    * [classic c library] New targets and new libraries which will be enumerated at official release

    * [new c library] A new c library has been written from scratch in assembly language and currently contains more than 700 functions
    * [new c library] Compatible with sdcc
    * [new c library] Many unique libraries including zx7 (compression), adt (C++ STL containers), fzx (proportional fonts), BIFROST/NIRVANA/SP1 (zx), tritone music and bitfx sound effects for 1-bit audio devices.
    * [new c library] Object oriented stdio allowing writing of sophisticated drivers using code inheritance from the library. Currently base classes implement serial character devices and terminal (console) devices.
    * [new c library] Targets supported initially include cp/m, embedded (generic z80) and zx (zx spectrum). The built-in crts allow creation of terminal windows with assignable input source using fixed width or proportional fonts, output as ROM or RAM-resident programs.
    * [new c library] The library and crts are highly configurable. Library build time options allow selection between fast and small library code and the crts can be configured at compile time by embedded pragmas in the C source code.

    * [sdcc] sdcc is fully supported as alternate C compiler using the new C library.
    * [sdcc] sdcc's output is improved by an additional 400 peephole rules supplied by z88dk
    * [sdcc] sdcc's calls to its primitives are modified to use smaller and faster callee linkage

    The combination sdcc+z88dk supplies a C compiler that behaves similarly to 32-bit C compilers. sdcc implements a large subset of C90/C95/C11 standards and the z88dk library completes the compliance. The only missing element is the disk i/o which is currently under development.

    sccz80 will often create smaller code than sdcc particularly when longs and floats are in use.

    Some benchmarks including Dhrystone 2.1 and Whetstone 1.2 comparing with some other commercial compilers:

    New documentation under construction:

    Collection of links describing how to compile with sdcc:

    Example programs using the classic library:

    Example programs using the new c library and sdcc:


    We are hoping to identify problems with installation and use before an official release. Particularly we are looking for problems with using the new elements in the release.

    1. Try making the new c library.

    cd z88dk/libsrc/_DEVELOPMENT
    windows: "Winmake all" (10-15 mins to complete)
    other: "make"

    2. Try compiling your own programs and some of the examples.

    Thanks to anyone who can find the time at this time of year to do a little testing.
    Последний раз редактировалось Alcoholics Anonymous; 17.12.2015 в 19:28. Причина: correct links

  2. Эти 3 пользователя(ей) поблагодарили Alcoholics Anonymous за это полезное сообщение:
    Ewgeny7 (20.12.2015), Oleg N. Cher (17.12.2015), thims (17.12.2015)

  3. #1
    С любовью к вам, Yandex.Direct
    Размещение рекламы на форуме способствует его дальнейшему развитию

  4. #2
    Guru Аватар для Sayman
    Благодарностей: 196

    По умолчанию

    А я вот, хоть убейте, не понимаю, зачем использовать z88dk если он в итоге ссылается на sdcc? не лучше ли не городить огород, а сразу собирать в sdcc? если библиотека у z88dk столь крута, то перенести её на sdcc. В её внутренности не смотрел, но по названию понимаю (предполагаю), что sdcc_чего-то там_ix или _iy ведёт к употреблению регистра ix. а он в свою очередь жуткий тормоз. в чём оптимизация-то?
    Последний раз редактировалось Sayman; 17.12.2015 в 08:24.
    0A заповедей:
    I. Не удаляй каталог свой.
    II. Не удаляй до времени ни одного файла.
    III. Не кради файлы.
    IV. Не желай программы ближнего своего.
    V. Почитай BDOS и BIOS как родителей своих ...

  5. #3

    По умолчанию

    Цитата Сообщение от Sayman Посмотреть сообщение
    А я вот, хоть убейте, не понимаю, зачем использовать z88dk если он в итоге ссылается на sdcc? не лучше ли не городить огород, а сразу собирать в sdcc? если библиотека у z88dk столь крута, то перенести её на sdcc.
    The library in z88dk is much larger and much more complete. The sdcc library is minimal, just enough for what is considered essential for embedded applications, and is missing quite a few things. But sdcc's library is written in C which makes it portable to all of sdcc's targets: the z80, z180, tls90, stm8, msp430, 8051 .... and this means sdcc can provide the same C library to all of its targets. sdcc is not interested in breaking this by importing libraries written for specific processors; doing so would mean different processors had different levels of C compliance, different corner case behaviours, and would require independent maintenance by people who were experts in those processors. This is something that we've talked about briefly with sdcc. Instead what what has happened in the past year is sdcc has been modified to accommodate z88dk and vice versa and this release is the first result of bringing the two projects closer together.

    The z88dk library is also not confining itself to the C standard. There are libraries for music synthesis, proportional font printing, graphics, game engines, and so on. None of this would be accepted in sdcc. And finally, z88dk tries to directly support any z80 target by incorporating crts and tweaking library code for each target, allowing programs to be compiled without the user having to understand compiler details. How many times has someone asked for a crt to use to compile with sdcc? Some of those crts I have seen are incomplete because the people writing them are themselves not familiar with the compiler details. The problem is more complicated with z88dk because the libraries are more extensive. z88dk supports about 50 targets now (only three at the moment on the new / sdcc-compatible side); sdcc has no interest in directly supporting specific z80 machines.

    So those are the reasons the two projects will not be merging. There is also another side to this: z88dk is now written to interface with any sort of compiler. At the moment that's sccz80 and sdcc but in the future maybe other C compilers or other language compilers could be interfaced to the z88dk libraries and its support for specific z80 targets.

    You can look at some example C programs here:
    None of these can be compiled using sdcc alone because of missing elements in its libraries but it can compile them when used in combination with z88dk.

    В её внутренности не смотрел, но по названию понимаю (предполагаю), что sdcc_чего-то там_ix или _iy ведёт к употреблению регистра ix. а он в свою очередь жуткий тормоз. в чём оптимизация-то?
    z88dk supports 50 different z80 machines. Some of those machines do not allow use of one or both index registers. So the library has been written to use one index register - IX. The assembler is able to swap IX and IY in output code so if the target is unable to use IX, the library code can be swapped to IY.

    sdcc complicates things a little bit because it uses IX as frame pointer. On targets that have no restriction on IX/IY, sdcc can be given IX and the library can use IY (the sdcc_iy library). On other targets, sdcc and the library must share IX (the sdcc_ix library). What this means is if a particular library function uses IX, it must save IX for sdcc. That's extra code that must be inserted. Because the library passes parameters by register or using callee linkage, the extra code can spoil a clean interface between compiler and library and this leads to larger code in the output. So you always want to use sdcc_iy if you can.

    I can give you one example in the qsort() function which uses IX as a function pointer.

    sdcc_ix C interface:

       pop af
       pop bc
       pop hl
       pop de
       pop bc
       push af
       push bc
       ex (sp),ix
       call asm_qsort
       pop ix
    sdcc_iy C interface (the assembler will change ix to iy):

       pop af
       pop bc
       pop hl
       pop de
       pop ix
       push af
       jp asm_qsort
    For the zx target:

    * If the rom interrupt is enabled, code cannot use IY. In this case sdcc programs must be compiled with the sdcc_ix library (library uses IX) and --reserve-regs-iy so that sdcc does not use IY.
    * If the rom interrupt is disabled, code can use IY so it's preferable to compile against sdcc_iy.

    I'm not sure if I understood the rest correctly but if you are asking if sdcc's generated code is improved, the answer is yes. sdcc's output is improved between 5-10% in size and speed, depending on the program, by the peephole rules supplied with z88dk. These are something that may be incorporated into sdcc in the future. Aside from that, z88dk changes sdcc's calls to its primitives to use callee linkage rather than standard C linkage. This will also shave a few hundred bytes off large programs.
    Последний раз редактировалось Alcoholics Anonymous; 17.12.2015 в 21:41.

  6. Этот пользователь поблагодарил Alcoholics Anonymous за это полезное сообщение:
    Oleg N. Cher (18.12.2015)

  7. #4

    По умолчанию

    z88dk 1.99A has been released and is available at sourceforge for download.

    Thanks to anyone who had a chance to do some testing. A few minor issues were found and corrected in the release.

    CHANGES (brief)

    z88dk 1.99A 23.Dec.2015
    Major changes incorporated into z88dk. This is a transition release in anticipation of v2.0.

    Two C compilers are supported (sccz80 - z88dk's native C compiler - and sdcc).
    Two different C libraries are present (classic - the same library as pre 1.99A - and new).

    Accordingly, there are now three different compile modes:

    1. Compile with sccz80 and the classic C library. This is equivalent to pre-1.99A.
    2. Compile with sccz80 and the new C library. Compile lines include "-clib=new".
    3. Compile with sdcc and the new C library. Compile lines include "-clib=sdcc_ix" or "-clib=sdcc_iy".

    [z80asm] Sections have been introduced for generating memory maps and compiling to bankswitched memory.
    [z80asm] Modern logical operators have been adopted.
    [z80asm] New scoping keywords PUBLIC, EXTERN and GLOBAL introduced.
    [z80asm] Relocate files are generated for output binaries for patching assembled code to a new address at load time.
    [sccz80] Numerous bugfixes.
    [sdcc] SDCC is now fully supported as alternate C compiler for the new C library.
    [sdcc] SDCC's generated code is improved by a large set of aggressive peephole rules (use -SO3 to enable).
    [sdcc] SDCC's calls to its primitive functions are modified to use callee linkage.
    [new c lib] New C library written in assembly language from scratch aiming for a subset of C11 compliance. Contains more than 700 functions currently.
    [new c lib] Stdio made object-oriented so that drivers can inherit library code to implement features with a minimal amount of additional code.
    [new c lib] Stdio base classes currently include serial character i/o and terminal i/o implementing windows and proportional fonts. Disk i/o is missing in this release.
    [new c lib] Unique stdio implementation allows removal of high level buffers without affecting performance.
    [new c lib] Many functions from GNU and POSIX are present beyond the C11 standard.
    [new c lib] Many unique libraries including some C++ STL containers, data compression, obstacks, game libraries, sound, fzx proportional fonts, etc. The new C lib contains libraries not present in the classic C lib and vice versa. Over time the two libraries will homogenize.
    [new c lib] CRTs are supplied for three initial targets: embedded (generic z80), cpm, zx (zx spectrum). Specialized crts allow immediate compilation without customization by the user.
    [new c lib] The library and crts are highly configurable at library build time and at compile time. Options allow easy generation of binaries for ROM or RAM targets.
    [tools] New tool ticks is a command line z80 emulator able to exactly measure execution time of a code block.
    [tools] New tool dzx7 is a decompressor counterpart to zx7.
    [tools] New tool zx7 is an optimal lz77/lzss data compressor with companion decompression subroutines in the z80 library.
    [appmake] +rom added to manipulate raw binaries; options include code injection, extraction and conversion to intel hex format.

    The new C library completes C standards compliance for sdcc and leads to much smaller and faster output binaries. sdcc's longlong type is not supported in this release.

    Documentation is a work in progress.


    Overview, Classic C Library Information:

    Overview, New C Library Description, SDCC compilation described:

    Some benchmarks:

  8. Этот пользователь поблагодарил Alcoholics Anonymous за это полезное сообщение:
    Oleg N. Cher (24.12.2015)

  9. #5
    Moderator Аватар для Error404
    Благодарностей: 866

    По умолчанию

    Hello! Is z88dk 1.99A able to compile entire FUZIX project (very capricious code)? Anybody tried? FUZIX-88dk working?
    Лучше сделать и жалеть, чем не сделать и жалеть.

  10. #6

    По умолчанию

    Цитата Сообщение от Error404 Посмотреть сообщение
    Hello! Is z88dk 1.99A able to compile entire FUZIX project (very capricious code)? Anybody tried? FUZIX-88dk working?
    We have been looking at it but it will require some work to do. It's structured right now to use what library functions sdcc has and to supply everything sdcc is missing using C to keep it compatible with all its supported CPUs. If you just compile it as-is using z88dk the savings will only be around 5-8% or so and I think it will be closer to 5% because of the way the code is written.

    z88dk's library is quite large and it's all written in assembler. Functions tend to be 3x smaller than the C equivalents that would be found in sdcc and fuzix. What you want to do is replace the sdcc library and some part of the fuzix C library with z88dk's library. For a lot of functions this is easy to do but FILEs and file descriptors are not implemented in the same way in z88dk and fuzix. Fuzix is taking a traditional unix approach whereas z88dk is doing something new in order to make things smaller. So when you get to functions from stdio and functions that deal with file descriptors, z88dk's library is not compatible. stdio happens to be where a significant amount of code savings can be found so you would want to rewrite some of z88dk's functions there to be compatible with fuzix.

    z88dk is structured so that you can create libraries by picking and choosing what goes in there, as well as providing your own replacements for some things so we may try to do this at some point. But as I said it will take some work and it will change fuzix's structure. I'm not sure if Alan is interested in something like this (asm level processor-specific) so it may have to be a fork. I do think we may be able to shrink the kernel by up to 10k (that's speculation though!).

    We are starting to document some of the inner-workings of the z88dk library now. It's a technical subject though. The creating-a-target topic describes how the target library is composed and how the CRT is made. This continues into the device driver section (which has only just been started) that gives an indication of how stdio communicates with device drivers. This is quite different from fuzix where each stream has a putchar/getchar and each open file has a buffer in ram to speed up char-at-a-time i/o. z88dk's approach has been to eliminate those buffers because they aren't affordable in 64k.
    Последний раз редактировалось Alcoholics Anonymous; 16.01.2016 в 09:12.

  11. #7

    По умолчанию

    z88dk's version of sdcc (zsdcc) has been patched to make the peepholer more accurate. This will improve code quality by some amount. You can update zsdcc in the usual way.

    More details in this thread. But not too many more :P

  12. #8
    г. Могилёв, Беларусь
    Благодарностей: 24

    По умолчанию

    Плохо что у z88dk нет графической оболочки.
    ¡ɹǝʌǝɹoɟ ɐʌɐɾ | Pascal forever!

  13. #9
    г. Кривой Рог, Украина
    Благодарностей: 73

    По умолчанию

    что такое графическая оболочка у компилятора?

  14. #10

    По умолчанию

    Цитата Сообщение от Smalovsky Посмотреть сообщение
    Плохо что у z88dk нет графической оболочки.
    I don't think a GUI or IDE helps anything. A compile line is normally one line and you can easily re-execute that by pressing up arrow and enter. If some files need to be processed, the steps can be put into a makefile or a batch file and that can be run instead. With sdcc in particular, if there are are many source files you may want to incrementally compile them using a makefile since sdcc can be very slow with optimization turned up.

    Development tools are normally command line oriented. Some people have their favourite IDE tools like eclipse that they are free to use in conjunction with any command line oriented tool.

Страница 1 из 2 12 ПоследняяПоследняя

Информация о теме

Пользователи, просматривающие эту тему

Эту тему просматривают: 1 (пользователей: 0 , гостей: 1)

Похожие темы

  1. Testers for new z88dk C library
    от Alcoholics Anonymous в разделе RST#38
    Ответов: 0
    Последнее: 27.12.2014, 05:32
  2. Сборка z88dk под OS X
    от foxweb в разделе Программирование
    Ответов: 0
    Последнее: 21.02.2014, 01:21
  3. Forever release
    от Sinus в разделе Демо
    Ответов: 9
    Последнее: 13.05.2008, 05:49
  4. BASin Release 13a
    от SGO в разделе Эмуляторы
    Ответов: 4
    Последнее: 26.12.2006, 16:58
  5. SP1 for Z88DK
    от Alcoholics Anonymous в разделе RST#38
    Ответов: 7
    Последнее: 30.06.2006, 18:23

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения