Skip to content

Appendix: runtime function sizes

Auto-generated

The statistics and tables on this page are regenerated from DCCRTL.MAC every time the documentation is built, by the docs/docs/hooks/runtime_sizes.py MkDocs hook. They never go out of step with the runtime source, so prefer these numbers over any quoted elsewhere.

This page estimates the source volume associated with selected runtime features and their transitive dependencies. For how dccrtlstrip decides what to keep — and the optimisation takeaways for keeping a program small — see Runtime optimization.

How to read the numbers

The numbers are relative source-line counts, not exact bytes (blocks contain comments and blank lines). They help locate large source/dependency groups, but cannot establish binary-size or performance rankings. Measure the linked .COM and assembler listings for those decisions.

  • self — source lines in the function's own block.
  • marginal — self plus every additional reachable block that is not already in the start-rooted baseline. Actual application references may already retain some of these blocks, reducing the incremental cost.
  • pulls in — the extra runtime blocks added beyond the baseline.

Symbols are internal runtime labels

The Symbol column lists the internal assembler label, not the C name you call. For example __stchk is the stack-overflow guard linked by -fstack-check, __mlh is the malloc heap helper, and __pf_run is the shared printf engine. Searching this page for a feature word such as "stack" or "printf" may not match the symbol — look for the corresponding __ label instead (the pulls in column names related ones).

Runtime: DCCRTL.MAC

  • Total runtime lines: 24771
  • Preamble lines before the first public: 12
  • Parsed public blocks: 429
  • Always-present baseline: ~364 lines in 7 blocks

Formatted I/O (stdio.h)

Symbol self marginal pulls in
_pffio 488 ~3245 public_prelude, _printf, __pf_run/pf_loop/pf_percent/..., pf_arg_hl, pf_pad_a/pf_pad_loop, pf_zsetup/pf_zs_clrw/pf_zs_done, pf_efflen, pf_iprepad, pf_ipostpad, pf_zero_prec_blank, pf_zfd/pf_zfd_zloop/pf_zfd_print/..., pf_emit_a/pfe_bufn/pfe_buf/..., ...
_fprintf 64 ~1778 public_prelude, __pf_run/pf_loop/pf_percent/..., pf_arg_hl, pf_pad_a/pf_pad_loop, pf_zsetup/pf_zs_clrw/pf_zs_done, pf_efflen, pf_iprepad, pf_ipostpad, pf_zero_prec_blank, pf_zfd/pf_zfd_zloop/pf_zfd_print/..., pf_emit_a/pfe_bufn/pfe_buf/..., pf_emstr, ...
_printf 24 ~788 public_prelude, __pf_run/pf_loop/pf_percent/..., pf_arg_hl, pf_pad_a/pf_pad_loop, pf_zsetup/pf_zs_clrw/pf_zs_done, pf_efflen, pf_iprepad, pf_ipostpad, pf_zero_prec_blank, pf_zfd/pf_zfd_zloop/pf_zfd_print/..., pf_emit_a/pfe_bufn/pfe_buf/..., pf_emstr, ...
_sprintf 35 ~799 public_prelude, __pf_run/pf_loop/pf_percent/..., pf_arg_hl, pf_pad_a/pf_pad_loop, pf_zsetup/pf_zs_clrw/pf_zs_done, pf_efflen, pf_iprepad, pf_ipostpad, pf_zero_prec_blank, pf_zfd/pf_zfd_zloop/pf_zfd_print/..., pf_emit_a/pfe_bufn/pfe_buf/..., pf_emstr, ...
_vprintf 26 ~790 public_prelude, __pf_run/pf_loop/pf_percent/..., pf_arg_hl, pf_pad_a/pf_pad_loop, pf_zsetup/pf_zs_clrw/pf_zs_done, pf_efflen, pf_iprepad, pf_ipostpad, pf_zero_prec_blank, pf_zfd/pf_zfd_zloop/pf_zfd_print/..., pf_emit_a/pfe_bufn/pfe_buf/..., pf_emstr, ...
_vsprintf 35 ~799 public_prelude, __pf_run/pf_loop/pf_percent/..., pf_arg_hl, pf_pad_a/pf_pad_loop, pf_zsetup/pf_zs_clrw/pf_zs_done, pf_efflen, pf_iprepad, pf_ipostpad, pf_zero_prec_blank, pf_zfd/pf_zfd_zloop/pf_zfd_print/..., pf_emit_a/pfe_bufn/pfe_buf/..., pf_emstr, ...
_vfprintf 63 ~1777 public_prelude, __pf_run/pf_loop/pf_percent/..., pf_arg_hl, pf_pad_a/pf_pad_loop, pf_zsetup/pf_zs_clrw/pf_zs_done, pf_efflen, pf_iprepad, pf_ipostpad, pf_zero_prec_blank, pf_zfd/pf_zfd_zloop/pf_zfd_print/..., pf_emit_a/pfe_bufn/pfe_buf/..., pf_emstr, ...
_puts 26 ~26 nothing beyond own block
__fpc 60 ~944 _errno, public_prelude, _write/wrcountok/wrloop/..., __chkfd/__chkfdl/cfbad, __usep, __offp/__lenp/__apset/..., __fcbp, __setrr/setrr_big, __chunk/ch_more128/ch_have_count/..., __advio/__extln/extln_diff/..., __zerdm/__fcbfresh, __rwerr/rwe_mark/__seter, ...
__fps 56 ~940 _errno, public_prelude, _write/wrcountok/wrloop/..., __chkfd/__chkfdl/cfbad, __usep, __offp/__lenp/__apset/..., __fcbp, __setrr/setrr_big, __chunk/ch_more128/ch_have_count/..., __advio/__extln/extln_diff/..., __zerdm/__fcbfresh, __rwerr/rwe_mark/__seter, ...
__pchr 12 ~12 nothing beyond own block

Console buffering control (stdio.h)

Symbol self marginal pulls in
_setvbuf 59 ~195 public_prelude, __cob_setbuf/csb_ok, __cobdflt, _errno, public_prelude, __rwerr/rwe_mark/__seter, __einval, __nospc/__slot/__chnk/..., public_prelude, __fderr
_setbuf 39 ~64 public_prelude, __cob_setbuf/csb_ok, __cobdflt
_fflush 11 ~11 nothing beyond own block

Console input (stdio.h)

Symbol self marginal pulls in
__gchr 35 ~83 __ugvalid, __ugchars, __ugget, __ceofst
__gtch 40 ~85 __kbht
__kbht 45 ~45 nothing beyond own block

Formatted input (scanf family)

Symbol self marginal pulls in
_fscanf 25 ~1719 __fgetc, __ugvalid, __ugchars, __ugget, __ugput, __getc, __gchr, __ceofst, _errno, public_prelude, _read/rdcon_count/rdcon_loop/..., __chkfd/__chkfdl/cfbad, ...
_scanf 21 ~1715 __fgetc, __ugvalid, __ugchars, __ugget, __ugput, __getc, __gchr, __ceofst, _errno, public_prelude, _read/rdcon_count/rdcon_loop/..., __chkfd/__chkfdl/cfbad, ...
_sscanf 25 ~1719 __fgetc, __ugvalid, __ugchars, __ugget, __ugput, __getc, __gchr, __ceofst, _errno, public_prelude, _read/rdcon_count/rdcon_loop/..., __chkfd/__chkfdl/cfbad, ...

Low-level file I/O

Symbol self marginal pulls in
_fread 107 ~1411 __ugvalid, __ugchars, __ugget, __gchr, __ceofst, __mulu, __udivmod, __dmcx, __divu, public_prelude, __q2u/D16U/D16U0/..., _errno, ...
_fwrite 85 ~1315 __mulu, __udivmod, __dmcx, __divu, public_prelude, __q2u/D16U/D16U0/..., _errno, public_prelude, _write/wrcountok/wrloop/..., __chkfd/__chkfdl/cfbad, __usep, __offp/__lenp/__apset/..., ...
_fgets 167 ~1125 __ugvalid, __ugchars, __ugget, __gchr, __ceofst, _errno, public_prelude, _read/rdcon_count/rdcon_loop/..., __chkfd/__chkfdl/cfbad, __rdhit/rdh_cmp/rdh_miss, __rdsto, __usep, ...
_fopen 92 ~1025 __fclr, __ugvalid, _errno, public_prelude, _open/opflagsok/opfind/..., __usep, __offp/__lenp/__apset/..., __fcbp, __setrr/setrr_big, __zerdm/__fcbfresh, __mkfcb/mfspc/mfnoprefix/..., __rwerr/rwe_mark/__seter, ...
_write 207 ~884 _errno, public_prelude, __chkfd/__chkfdl/cfbad, __usep, __offp/__lenp/__apset/..., __fcbp, __setrr/setrr_big, __chunk/ch_more128/ch_have_count/..., __advio/__extln/extln_diff/..., __zerdm/__fcbfresh, __rwerr/rwe_mark/__seter, __ebadf, ...
_lseek 123 ~679 __ugvalid, _errno, public_prelude, __chkfd/__chkfdl/cfbad, __usep, __offp/__lenp/__apset/..., __fcbp, __setrr/setrr_big, __rwerr/rwe_mark/__seter, __ebadf, __einval, __nospc/__slot/__chnk/..., ...
_read 177 ~958 __ugvalid, __ugchars, __ugget, __gchr, __ceofst, _errno, public_prelude, __chkfd/__chkfdl/cfbad, __rdhit/rdh_cmp/rdh_miss, __rdsto, __usep, __offp/__lenp/__apset/..., ...
_open 230 ~916 __ugvalid, _errno, public_prelude, __usep, __offp/__lenp/__apset/..., __fcbp, __setrr/setrr_big, __zerdm/__fcbfresh, __mkfcb/mfspc/mfnoprefix/..., __rwerr/rwe_mark/__seter, __enoent, __ioerr, ...
_close 56 ~245 __ugvalid, _errno, public_prelude, __chkfd/__chkfdl/cfbad, __usep, __fcbp, __rwerr/rwe_mark/__seter, __ioerr, __ebadf, __nospc/__slot/__chnk/..., public_prelude, __rdcv, ...
_unlink 40 ~274 _errno, public_prelude, __mkfcb/mfspc/mfnoprefix/..., __rwerr/rwe_mark/__seter, __enoent, __nospc/__slot/__chnk/..., public_prelude, __fderr
_fclose 12 ~257 __ugvalid, _errno, public_prelude, _close/clok/clbad/..., __chkfd/__chkfdl/cfbad, __usep, __fcbp, __rwerr/rwe_mark/__seter, __ioerr, __ebadf, __nospc/__slot/__chnk/..., public_prelude, ...

Memory (stdlib.h)

Symbol self marginal pulls in
_calloc 34 ~580 __wr_hf, __mulu, __udivmod, __dmcx, __divu, public_prelude, __q2u/D16U/D16U0/..., __ckmul, __mlh
__real 251 ~615 __wr_hf, __frcoal, __mlh
_malloc 9 ~255 __wr_hf, __mlh
_free 8 ~164 __wr_hf, __frcoal

16-bit integer and sort/search

Symbol self marginal pulls in
_qsort 176 ~259 __call_hl, __mulu
_bsearch 100 ~183 __call_hl, __mulu
__stol 13 ~1067 __mulu, _errno, __lmul, __ldu, __lmu, __lgu, __lmd, __lrlo, __lrhi, public_prelude, sc_isspace/SCL4/SCL8, sc_isdigit/SCL13/SCL21/..., ...
__stou 489 ~1054 __mulu, _errno, __lmul, __ldu, __lmu, __lgu, __lmd, __lrlo, __lrhi, public_prelude, sc_isspace/SCL4/SCL8, sc_isdigit/SCL13/SCL21/...
_atol 124 ~124 nothing beyond own block
_atoi 97 ~97 nothing beyond own block
_rand 46 ~46 nothing beyond own block
_srand 8 ~54 _rand
_abs 16 ~16 nothing beyond own block
_labs 34 ~34 nothing beyond own block
_div 31 ~227 __udivmod, __sdivmod, public_prelude, __q2u/D16U/D16U0/...
_ldiv 79 ~402 __lmu, __lds, __lmd, __lrlo, __lrhi

32-bit long arithmetic

Symbol self marginal pulls in
__lmul 118 ~209 __mulu, __lmd
__lds 76 ~323 __lmu, __lmd, __lrlo, __lrhi
__lms 73 ~320 __lmu, __lmd, __lrlo, __lrhi
__ldu 22 ~269 __lmu, __lmd, __lrlo, __lrhi
__lmu 221 ~247 __lmd, __lrlo, __lrhi
__lts 41 ~41 nothing beyond own block
__ltu 28 ~28 nothing beyond own block

Float operators and conversions

Symbol self marginal pulls in
__fadd 9 ~976 __fsub, FPACKR, FUNR, FPKR, FSHR, __frnd, __fdiv
__fmul 399 ~1114 __m1u, __m8u, FPACKR, FPKR, FSHR, __frnd, __fprd, __fdiv
__fdiv 376 ~491 FSHR
__flt - - not found
__feq - - not found
__fif 15 ~46 __fuf
__ffi 29 ~64 __ffu
__flf 28 ~77 __fulf
__ffl 41 ~91 __fful

math.h float functions

Symbol self marginal pulls in
_powf 252 ~3245 _errno, __m1u, __m8u, __fzro, __fnan, __finf, __fcmpsf, __fltf, __fgtf, __flef, __fuf, __fif, ...
_tanhf 108 ~2639 _errno, __m1u, __m8u, __fcmpsf, __fltf, __fgtf, __flef, __faf, __fsf, __fsub, FPACKR, FUNR, ...
_sinhf 70 ~2574 _errno, __m1u, __m8u, __finf, __fcmpsf, __fltf, __flef, __faf, __fsf, __fsub, FPACKR, FUNR, ...
_coshf 58 ~2562 _errno, __m1u, __m8u, __finf, __fcmpsf, __fltf, __flef, __faf, __fsf, __fsub, FPACKR, FUNR, ...
_expf 274 ~2426 _errno, __m1u, __m8u, __fcmpsf, __fltf, __flef, __faf, __fsf, __fsub, FPACKR, FUNR, FPKR, ...
_tanf 247 ~2567 _errno, __m1u, __m8u, __fnan, __finf, __fcmpsf, __fltf, __fgtf, __faf, __fsf, __fsub, FPACKR, ...
_acosf 25 ~2630 _errno, __m1u, __m8u, __fzro, __fnan, __finf, __fcmpsf, __fltf, __fgtf, __faf, __fsf, __fsub, ...
_atan2f 234 ~2545 __m1u, __m8u, __fnan, __finf, __feqf, __fcmpsf, __fltf, __fgtf, __flef, __faf, __fsf, __fsub, ...
_log10f 26 ~2462 _errno, __m1u, __m8u, __fzro, __fnan, __finf, __fcmpsf, __fgtf, __fuf, __fif, __faf, __fsf, ...
_asinf 301 ~2605 _errno, __m1u, __m8u, __fzro, __fnan, __finf, __fcmpsf, __fltf, __fgtf, __faf, __fsf, __fsub, ...
_logf 232 ~2436 _errno, __m1u, __m8u, __fzro, __fnan, __finf, __fcmpsf, __fgtf, __fuf, __fif, __faf, __fsf, ...
_cosf 238 ~2517 _errno, __m1u, __m8u, __fnan, __finf, __fcmpsf, __fltf, __fgtf, __faf, __fsf, __fsub, FPACKR, ...
_sinf 218 ~2497 _errno, __m1u, __m8u, __fnan, __finf, __fcmpsf, __fltf, __fgtf, __faf, __fsf, __fsub, FPACKR, ...
_atanf 244 ~2148 __m1u, __m8u, __fcmpsf, __fltf, __fgtf, __faf, __fsf, __fsub, FPACKR, FUNR, FPKR, FSHR, ...
_sqrtf 221 ~2250 _errno, __m1u, __m8u, __fzro, __fnan, __finf, __fcmpsf, __fltf, __faf, __fsf, __fsub, FPACKR, ...
_modff 180 ~1190 __fsf, __fsub, FPACKR, FUNR, FPKR, FSHR, __frnd, __fdiv, public_prelude
_fmodf 335 ~392 _errno, __fnan, __finf, public_prelude, __medom
_ldexpf 249 ~307 _errno, __fnan, __finf, public_prelude, __merng
_nextafterf 259 ~527 _errno, __fzro, __fnan, __feqf, __fcmpsf, __fltf, public_prelude, __merng
_floorf 11 ~110 public_prelude, __frint/frint_right/frint_floor_adjust/...
_ceilf 22 ~121 public_prelude, __frint/frint_right/frint_floor_adjust/...
_frexpf 128 ~175 __fnan, __finf
_fabsf 13 ~13 nothing beyond own block

string.h / ctype.h

Symbol self marginal pulls in
__sdup 44 ~305 __wr_hf, __slf, __mlh
__sstr 115 ~115 nothing beyond own block
__stok 111 ~196 __spbr, __sspn
__mset 44 ~44 nothing beyond own block
__mcpy 25 ~25 nothing beyond own block
__scpy 12 ~12 nothing beyond own block
__slen 17 ~32 __slf
__caa 19 ~35 __ctarg
__ctu 24 ~24 nothing beyond own block
__schr 45 ~45 nothing beyond own block
__srch 35 ~35 nothing beyond own block
__mcmp 25 ~25 nothing beyond own block
__mchr 14 ~14 nothing beyond own block

CP/M extensions and misc

Symbol self marginal pulls in
_perror 58 ~139 _strerror, _errno
_dopn 78 ~349 _errno, public_prelude, __mkfcb/mfspc/mfnoprefix/..., __rwerr/rwe_mark/__seter, __einval, __emfil, __nospc/__slot/__chnk/..., public_prelude, __fderr, _dcls
_drd 96 ~445 _errno, public_prelude, __mkfcb/mfspc/mfnoprefix/..., __rwerr/rwe_mark/__seter, __einval, __emfil, __nospc/__slot/__chnk/..., public_prelude, __fderr, _dopn, _dcls
_strerror 77 ~77 nothing beyond own block
_setjmp 58 ~58 nothing beyond own block
_longjmp 90 ~90 nothing beyond own block
_bdos 11 ~39 __bdosf
_inp 14 ~14 nothing beyond own block
_outp 18 ~18 nothing beyond own block
__stchk 72 ~72 nothing beyond own block