about summary refs log tree commit diff stats
path: root/Brewfile.travis
Commit message (Collapse)AuthorAgeFilesLines
* Add sqlite to CI dependenciesMichael Vetter2020-04-061-0/+1
|
* Add cmocka to brewfileMichael Vetter2019-07-181-0/+1
|
* Add Travis CI tests for Arch, Debian and OSX/macOSWilliam Wennerström2019-06-061-0/+20
+ Arch and Debian are run in Docker containers, as openSUSE Tumbleweed. + OSX/macOS doesn't use any containers. * Homebrew is used to fetch all the dependencies. * The dependencies are declared in the Brewfile.travis file. + The travis-build.sh script has been modified to check for the current OS and the different configure flags has been moved into an array that'll be looped through instead. The xscreensaver (for libXScrnSaver) flags has been removed for macOS as it only makes sense for systems running X11, which macOS doesn't (usually) do. + Some minor shellcheck fixes, too. Fixes: #1100
a id='n80' href='#n80'>80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
# The stack shouldn't grow into the code area.

== code

check-stack:
    # . prologue
    55/push-ebp
    89/<- %ebp 4/r32/esp
    # . save registers
    50/push-eax
    #
    89/<- %eax 4/r32/esp
    3d/compare-eax-and 0x01000000/imm32
    {
      7f/jump-if-> break/disp8
      (abort "stack overflow")
    }
$check-stack:end:
    # . restore registers
    58/pop-to-eax
    # . epilogue
    89/<- %esp 5/r32/ebp
    5d/pop-to-ebp
    c3/return

show-stack-state:
    # . prologue
    55/push-ebp
    89/<- %ebp 4/r32/esp
    # . save registers
    50/push-eax
    51/push-ecx
    52/push-edx
    #
    89/<- %edx 4/r32/esp
    # save old cursor position
    (cursor-position 0)  # => eax, ecx
    # print at top-right
    (set-cursor-position 0 0x70 0)
    (draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0 %edx 0xf 0xc)
    # restore cursor position
    (set-cursor-position %eax %ecx)
$show-stack-state:end:
    # . restore registers
    5a/pop-to-edx
    59/pop-to-ecx
    58/pop-to-eax
    # . epilogue
    89/<- %esp 5/r32/ebp
    5d/pop-to-ebp
    c3/return

# Helper for debugging deeply recursive calls without logs or traces.
# Turn it on, insert calls in the right places, and you get a terse sense of
# important parts of the call stack. A poor sophont's stack trace.
debug-print:  # x: (addr array byte), fg: int, bg: int    # x is very short; usually a single character
    # . prologue
    55/push-ebp
    89/<- %ebp 4/r32/esp
    # . save registers
    50/push-eax
    51/push-ecx
    #
    {
      81 7/subop/compare *Really-debug-print 0/imm32/false
      74/jump-if-= break/disp8
      (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 *(ebp+8) *(ebp+0xc) *(ebp+0x10))
      # clear the screen and continue if we got too close to the bottom
      (cursor-position 0)  # => eax, ecx
      81 7/subop/compare %ecx 0x28/imm32
      75/jump-if-!= break/disp8
      (clear-screen 0)
      (set-cursor-position 0 0 0)
    }
$debug-print:end:
    # . restore registers
    59/pop-to-ecx
    58/pop-to-eax
    # . epilogue
    89/<- %esp 5/r32/ebp
    5d/pop-to-ebp
    c3/return

debug-print?:  # -> _/eax: boolean
    # . prologue
    55/push-ebp
    89/<- %ebp 4/r32/esp
    #
    8b/-> *Really-debug-print 0/r32/eax
$debug-print?:end:
    # . epilogue
    89/<- %esp 5/r32/ebp
    5d/pop-to-ebp
    c3/return

turn-on-debug-print:
    # . prologue
    55/push-ebp
    89/<- %ebp 4/r32/esp
    #
    c7 0/subop/copy *Really-debug-print 1/imm32/true
$turn-on-debug-print:end:
    # . epilogue
    89/<- %esp 5/r32/ebp
    5d/pop-to-ebp
    c3/return

turn-off-debug-print:
    # . prologue
    55/push-ebp
    89/<- %ebp 4/r32/esp
    #
    c7 0/subop/copy *Really-debug-print 0/imm32/false
$turn-off-debug-print:end:
    # . epilogue
    89/<- %esp 5/r32/ebp
    5d/pop-to-ebp
    c3/return

== data
Really-debug-print:
  0/imm32/false
#?   1/imm32/true
a> 372 373 374 375 376 377 378 379 380 381 382 383 384 385