From 3a7da4e735247daaafe0f715bd2de4fb21e44e3d Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Thu, 28 Nov 2019 00:36:58 -0800 Subject: 5769 - support uppercase hex in SubX --- 067parse-hex.subx | 20 +- apps/assort | Bin 42897 -> 42899 bytes apps/braces | Bin 42912 -> 42914 bytes apps/calls | Bin 47623 -> 47625 bytes apps/crenshaw2-1 | Bin 42304 -> 42306 bytes apps/crenshaw2-1b | Bin 42851 -> 42853 bytes apps/dquotes | Bin 46547 -> 46549 bytes apps/factorial | Bin 41323 -> 41325 bytes apps/handle | Bin 42221 -> 42223 bytes apps/hex | Bin 45143 -> 45145 bytes apps/mu | Bin 54668 -> 54670 bytes apps/pack | Bin 55288 -> 55290 bytes apps/sigils | Bin 55298 -> 55300 bytes apps/survey | Bin 52137 -> 52139 bytes apps/tests | Bin 41694 -> 41696 bytes html/067parse-hex.subx.html | 454 ++++++++++++++++++++++---------------------- 16 files changed, 241 insertions(+), 233 deletions(-) diff --git a/067parse-hex.subx b/067parse-hex.subx index 2ba3c740..0695ebeb 100644 --- a/067parse-hex.subx +++ b/067parse-hex.subx @@ -644,21 +644,25 @@ is-hex-digit?: # c : byte -> eax : boolean # ecx = c 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 8/disp8 . # copy *(ebp+8) to ecx # return false if c < '0' - b8/copy-to-eax 0/imm32/false 81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0x30/imm32 # compare ecx - 7c/jump-if-lesser $is-hex-digit?:end/disp8 - # return false if c > 'f' - 81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0x66/imm32 # compare ecx - 7f/jump-if-greater $is-hex-digit?:end/disp8 + 7c/jump-if-lesser $is-hex-digit?:false/disp8 # return true if c <= '9' - b8/copy-to-eax 1/imm32/true 81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0x39/imm32 # compare ecx - 7e/jump-if-lesser-or-equal $is-hex-digit?:end/disp8 + 7e/jump-if-lesser-or-equal $is-hex-digit?:true/disp8 + # drop case + 25/and-eax-with 0x5f/imm32 + # return false if c > 'f' + 81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0x66/imm32 # compare ecx + 7f/jump-if-greater $is-hex-digit?:false/disp8 # return true if c >= 'a' 81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0x61/imm32 # compare ecx - 7d/jump-if-greater-or-equal $is-hex-digit?:end/disp8 + 7d/jump-if-greater-or-equal $is-hex-digit?:true/disp8 +$is-hex-digit?:false: # otherwise return false b8/copy-to-eax 0/imm32/false + eb/jump $is-hex-digit?:end/disp8 +$is-hex-digit?:true: + b8/copy-to-eax 1/imm32/true $is-hex-digit?:end: # . restore registers 59/pop-to-ecx diff --git a/apps/assort b/apps/assort index 1d59ee52..323d8705 100755 Binary files a/apps/assort and b/apps/assort differ diff --git a/apps/braces b/apps/braces index 14c0ccf3..94109822 100755 Binary files a/apps/braces and b/apps/braces differ diff --git a/apps/calls b/apps/calls index 4a0e624e..00c502c5 100755 Binary files a/apps/calls and b/apps/calls differ diff --git a/apps/crenshaw2-1 b/apps/crenshaw2-1 index df96c01f..8a1a05a1 100755 Binary files a/apps/crenshaw2-1 and b/apps/crenshaw2-1 differ diff --git a/apps/crenshaw2-1b b/apps/crenshaw2-1b index 7483e148..c9dff7c7 100755 Binary files a/apps/crenshaw2-1b and b/apps/crenshaw2-1b differ diff --git a/apps/dquotes b/apps/dquotes index e29314af..4a326cfd 100755 Binary files a/apps/dquotes and b/apps/dquotes differ diff --git a/apps/factorial b/apps/factorial index b1a187c9..5f822d01 100755 Binary files a/apps/factorial and b/apps/factorial differ diff --git a/apps/handle b/apps/handle index ac77dfb4..ba457735 100755 Binary files a/apps/handle and b/apps/handle differ diff --git a/apps/hex b/apps/hex index cc517a6e..8a6e8311 100755 Binary files a/apps/hex and b/apps/hex differ diff --git a/apps/mu b/apps/mu index 0be59aa0..2c2e2ee0 100755 Binary files a/apps/mu and b/apps/mu differ diff --git a/apps/pack b/apps/pack index 2df718bb..1d0debc3 100755 Binary files a/apps/pack and b/apps/pack differ diff --git a/apps/sigils b/apps/sigils index a0599e03..65e7d064 100755 Binary files a/apps/sigils and b/apps/sigils differ diff --git a/apps/survey b/apps/survey index 59d457fa..6804bd06 100755 Binary files a/apps/survey and b/apps/survey differ diff --git a/apps/tests b/apps/tests index 68009fe7..4c257895 100755 Binary files a/apps/tests and b/apps/tests differ diff --git a/html/067parse-hex.subx.html b/html/067parse-hex.subx.html index 91db9840..4b0b94f5 100644 --- a/html/067parse-hex.subx.html +++ b/html/067parse-hex.subx.html @@ -467,7 +467,7 @@ if ('onhashchange' in window) { 407 # . . copy arg to eax 408 8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . . # copy byte at *ecx to AL 409 # . . call -410 e8/call from-hex-char/disp32 +410 e8/call from-hex-char/disp32 411 # result = result * 16 + eax 412 c1/shift 4/subop/left 3/mod/direct 3/rm32/ebx . . . . . 4/imm8 # shift ebx left by 4 bits 413 01/add 3/mod/direct 3/rm32/ebx . . . 0/r32/eax . . # add eax to ebx @@ -704,232 +704,236 @@ if ('onhashchange' in window) { 644 # ecx = c 645 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 8/disp8 . # copy *(ebp+8) to ecx 646 # return false if c < '0' -647 b8/copy-to-eax 0/imm32/false -648 81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0x30/imm32 # compare ecx -649 7c/jump-if-lesser $is-hex-digit?:end/disp8 -650 # return false if c > 'f' -651 81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0x66/imm32 # compare ecx -652 7f/jump-if-greater $is-hex-digit?:end/disp8 -653 # return true if c <= '9' -654 b8/copy-to-eax 1/imm32/true -655 81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0x39/imm32 # compare ecx -656 7e/jump-if-lesser-or-equal $is-hex-digit?:end/disp8 +647 81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0x30/imm32 # compare ecx +648 7c/jump-if-lesser $is-hex-digit?:false/disp8 +649 # return true if c <= '9' +650 81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0x39/imm32 # compare ecx +651 7e/jump-if-lesser-or-equal $is-hex-digit?:true/disp8 +652 # drop case +653 25/and-eax-with 0x5f/imm32 +654 # return false if c > 'f' +655 81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0x66/imm32 # compare ecx +656 7f/jump-if-greater $is-hex-digit?:false/disp8 657 # return true if c >= 'a' 658 81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0x61/imm32 # compare ecx -659 7d/jump-if-greater-or-equal $is-hex-digit?:end/disp8 -660 # otherwise return false -661 b8/copy-to-eax 0/imm32/false -662 $is-hex-digit?:end: -663 # . restore registers -664 59/pop-to-ecx -665 # . epilogue -666 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp -667 5d/pop-to-ebp -668 c3/return -669 -670 test-hex-below-0: -671 # eax = is-hex-digit?(0x2f) -672 # . . push args -673 68/push 0x2f/imm32 -674 # . . call -675 e8/call is-hex-digit?/disp32 -676 # . . discard args -677 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -678 # check-ints-equal(eax, 0, msg) -679 # . . push args -680 68/push "F - test-hex-below-0"/imm32 -681 68/push 0/imm32/false -682 50/push-eax -683 # . . call -684 e8/call check-ints-equal/disp32 -685 # . . discard args -686 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -687 c3/return -688 -689 test-hex-0-to-9: -690 # eax = is-hex-digit?(0x30) -691 # . . push args -692 68/push 0x30/imm32 -693 # . . call -694 e8/call is-hex-digit?/disp32 -695 # . . discard args -696 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -697 # check-ints-equal(eax, 1, msg) -698 # . . push args -699 68/push "F - test-hex-at-0"/imm32 -700 68/push 1/imm32/true -701 50/push-eax -702 # . . call -703 e8/call check-ints-equal/disp32 -704 # . . discard args -705 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -706 # eax = is-hex-digit?(0x39) -707 # . . push args -708 68/push 0x39/imm32 -709 # . . call -710 e8/call is-hex-digit?/disp32 -711 # . . discard args -712 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -713 # check-ints-equal(eax, 1, msg) -714 # . . push args -715 68/push "F - test-hex-at-9"/imm32 -716 68/push 1/imm32/true -717 50/push-eax -718 # . . call -719 e8/call check-ints-equal/disp32 -720 # . . discard args -721 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -722 c3/return -723 -724 test-hex-above-9-to-a: -725 # eax = is-hex-digit?(0x3a) -726 # . . push args -727 68/push 0x3a/imm32 -728 # . . call -729 e8/call is-hex-digit?/disp32 -730 # . . discard args -731 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -732 # check-ints-equal(eax, 0, msg) -733 # . . push args -734 68/push "F - test-hex-above-9-to-a"/imm32 -735 68/push 0/imm32/false -736 50/push-eax -737 # . . call -738 e8/call check-ints-equal/disp32 -739 # . . discard args -740 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -741 c3/return -742 -743 test-hex-a-to-f: -744 # eax = is-hex-digit?(0x61) -745 # . . push args -746 68/push 0x61/imm32 -747 # . . call -748 e8/call is-hex-digit?/disp32 -749 # . . discard args -750 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -751 # check-ints-equal(eax, 1, msg) -752 # . . push args -753 68/push "F - test-hex-at-a"/imm32 -754 68/push 1/imm32/true -755 50/push-eax -756 # . . call -757 e8/call check-ints-equal/disp32 -758 # . . discard args -759 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -760 # eax = is-hex-digit?(0x66) -761 # . . push args -762 68/push 0x66/imm32 -763 # . . call -764 e8/call is-hex-digit?/disp32 -765 # . . discard args -766 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -767 # check-ints-equal(eax, 1, msg) -768 # . . push args -769 68/push "F - test-hex-at-f"/imm32 -770 68/push 1/imm32/true -771 50/push-eax -772 # . . call -773 e8/call check-ints-equal/disp32 -774 # . . discard args -775 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -776 c3/return -777 -778 test-hex-above-f: -779 # eax = is-hex-digit?(0x67) -780 # . . push args -781 68/push 0x67/imm32 -782 # . . call -783 e8/call is-hex-digit?/disp32 -784 # . . discard args -785 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -786 # check-ints-equal(eax, 0, msg) -787 # . . push args -788 68/push "F - test-hex-above-f"/imm32 -789 68/push 0/imm32/false -790 50/push-eax -791 # . . call -792 e8/call check-ints-equal/disp32 -793 # . . discard args -794 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -795 c3/return -796 -797 from-hex-char: # in/eax : byte -> out/eax : nibble -798 $from-hex-char:check0: -799 # if (eax < '0') goto abort -800 3d/compare-eax-with 0x30/imm32/0 -801 7c/jump-if-lesser $from-hex-char:abort/disp8 -802 $from-hex-char:check1: -803 # if (eax > 'f') goto abort -804 3d/compare-eax-with 0x66/imm32/f -805 7f/jump-if-greater $from-hex-char:abort/disp8 -806 $from-hex-char:check2: -807 # if (eax > '9') goto next check -808 3d/compare-eax-with 0x39/imm32/9 -809 7f/jump-if-greater $from-hex-char:check3/disp8 -810 $from-hex-char:digit: -811 # return eax - '0' -812 2d/subtract-from-eax 0x30/imm32/0 -813 c3/return -814 $from-hex-char:check3: -815 # if (eax < 'a') goto abort -816 3d/compare-eax-with 0x61/imm32/a -817 7c/jump-if-lesser $from-hex-char:abort/disp8 -818 $from-hex-char:letter: -819 # return eax - ('a'-10) -820 2d/subtract-from-eax 0x57/imm32/a-10 -821 c3/return -822 -823 $from-hex-char:abort: -824 # . _write(2/stderr, error) -825 # . . push args -826 68/push "invalid hex char: "/imm32 -827 68/push 2/imm32/stderr -828 # . . call -829 e8/call _write/disp32 -830 # . . discard args -831 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -832 # . clear-stream(Stderr->buffer) -833 # . . save eax -834 50/push-eax -835 # . . push args -836 68/push Stderr->buffer/imm32 -837 # . . call -838 e8/call clear-stream/disp32 -839 # . . discard args -840 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -841 # . . restore eax -842 58/pop-to-eax -843 # . print-int32-buffered(Stderr, eax) -844 # . . push args -845 50/push-eax -846 68/push Stderr/imm32 -847 # . . call -848 e8/call print-int32-buffered/disp32 -849 # . . discard args -850 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -851 # . flush(Stderr) -852 # . . push args -853 68/push Stderr/imm32 -854 # . . call -855 e8/call flush/disp32 -856 # . . discard args -857 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp -858 # . _write(2/stderr, "\n") -859 # . . push args -860 68/push Newline/imm32 -861 68/push 2/imm32/stderr -862 # . . call -863 e8/call _write/disp32 -864 # . . discard args -865 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp -866 # . syscall(exit, 1) -867 bb/copy-to-ebx 1/imm32 -868 b8/copy-to-eax 1/imm32/exit -869 cd/syscall 0x80/imm8 -870 # never gets here -871 -872 # . . vim:nowrap:textwidth=0 +659 7d/jump-if-greater-or-equal $is-hex-digit?:true/disp8 +660 $is-hex-digit?:false: +661 # otherwise return false +662 b8/copy-to-eax 0/imm32/false +663 eb/jump $is-hex-digit?:end/disp8 +664 $is-hex-digit?:true: +665 b8/copy-to-eax 1/imm32/true +666 $is-hex-digit?:end: +667 # . restore registers +668 59/pop-to-ecx +669 # . epilogue +670 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp +671 5d/pop-to-ebp +672 c3/return +673 +674 test-hex-below-0: +675 # eax = is-hex-digit?(0x2f) +676 # . . push args +677 68/push 0x2f/imm32 +678 # . . call +679 e8/call is-hex-digit?/disp32 +680 # . . discard args +681 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp +682 # check-ints-equal(eax, 0, msg) +683 # . . push args +684 68/push "F - test-hex-below-0"/imm32 +685 68/push 0/imm32/false +686 50/push-eax +687 # . . call +688 e8/call check-ints-equal/disp32 +689 # . . discard args +690 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp +691 c3/return +692 +693 test-hex-0-to-9: +694 # eax = is-hex-digit?(0x30) +695 # . . push args +696 68/push 0x30/imm32 +697 # . . call +698 e8/call is-hex-digit?/disp32 +699 # . . discard args +700 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp +701 # check-ints-equal(eax, 1, msg) +702 # . . push args +703 68/push "F - test-hex-at-0"/imm32 +704 68/push 1/imm32/true +705 50/push-eax +706 # . . call +707 e8/call check-ints-equal/disp32 +708 # . . discard args +709 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp +710 # eax = is-hex-digit?(0x39) +711 # . . push args +712 68/push 0x39/imm32 +713 # . . call +714 e8/call is-hex-digit?/disp32 +715 # . . discard args +716 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp +717 # check-ints-equal(eax, 1, msg) +718 # . . push args +719 68/push "F - test-hex-at-9"/imm32 +720 68/push 1/imm32/true +721 50/push-eax +722 # . . call +723 e8/call check-ints-equal/disp32 +724 # . . discard args +725 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp +726 c3/return +727 +728 test-hex-above-9-to-a: +729 # eax = is-hex-digit?(0x3a) +730 # . . push args +731 68/push 0x3a/imm32 +732 # . . call +733 e8/call is-hex-digit?/disp32 +734 # . . discard args +735 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp +736 # check-ints-equal(eax, 0, msg) +737 # . . push args +738 68/push "F - test-hex-above-9-to-a"/imm32 +739 68/push 0/imm32/false +740 50/push-eax +741 # . . call +742 e8/call check-ints-equal/disp32 +743 # . . discard args +744 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp +745 c3/return +746 +747 test-hex-a-to-f: +748 # eax = is-hex-digit?(0x61) +749 # . . push args +750 68/push 0x61/imm32 +751 # . . call +752 e8/call is-hex-digit?/disp32 +753 # . . discard args +754 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp +755 # check-ints-equal(eax, 1, msg) +756 # . . push args +757 68/push "F - test-hex-at-a"/imm32 +758 68/push 1/imm32/true +759 50/push-eax +760 # . . call +761 e8/call check-ints-equal/disp32 +762 # . . discard args +763 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp +764 # eax = is-hex-digit?(0x66) +765 # . . push args +766 68/push 0x66/imm32 +767 # . . call +768 e8/call is-hex-digit?/disp32 +769 # . . discard args +770 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp +771 # check-ints-equal(eax, 1, msg) +772 # . . push args +773 68/push "F - test-hex-at-f"/imm32 +774 68/push 1/imm32/true +775 50/push-eax +776 # . . call +777 e8/call check-ints-equal/disp32 +778 # . . discard args +779 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp +780 c3/return +781 +782 test-hex-above-f: +783 # eax = is-hex-digit?(0x67) +784 # . . push args +785 68/push 0x67/imm32 +786 # . . call +787 e8/call is-hex-digit?/disp32 +788 # . . discard args +789 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp +790 # check-ints-equal(eax, 0, msg) +791 # . . push args +792 68/push "F - test-hex-above-f"/imm32 +793 68/push 0/imm32/false +794 50/push-eax +795 # . . call +796 e8/call check-ints-equal/disp32 +797 # . . discard args +798 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp +799 c3/return +800 +801 from-hex-char: # in/eax : byte -> out/eax : nibble +802 $from-hex-char:check0: +803 # if (eax < '0') goto abort +804 3d/compare-eax-with 0x30/imm32/0 +805 7c/jump-if-lesser $from-hex-char:abort/disp8 +806 $from-hex-char:check1: +807 # if (eax > 'f') goto abort +808 3d/compare-eax-with 0x66/imm32/f +809 7f/jump-if-greater $from-hex-char:abort/disp8 +810 $from-hex-char:check2: +811 # if (eax > '9') goto next check +812 3d/compare-eax-with 0x39/imm32/9 +813 7f/jump-if-greater $from-hex-char:check3/disp8 +814 $from-hex-char:digit: +815 # return eax - '0' +816 2d/subtract-from-eax 0x30/imm32/0 +817 c3/return +818 $from-hex-char:check3: +819 # if (eax < 'a') goto abort +820 3d/compare-eax-with 0x61/imm32/a +821 7c/jump-if-lesser $from-hex-char:abort/disp8 +822 $from-hex-char:letter: +823 # return eax - ('a'-10) +824 2d/subtract-from-eax 0x57/imm32/a-10 +825 c3/return +826 +827 $from-hex-char:abort: +828 # . _write(2/stderr, error) +829 # . . push args +830 68/push "invalid hex char: "/imm32 +831 68/push 2/imm32/stderr +832 # . . call +833 e8/call _write/disp32 +834 # . . discard args +835 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp +836 # . clear-stream(Stderr->buffer) +837 # . . save eax +838 50/push-eax +839 # . . push args +840 68/push Stderr->buffer/imm32 +841 # . . call +842 e8/call clear-stream/disp32 +843 # . . discard args +844 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp +845 # . . restore eax +846 58/pop-to-eax +847 # . print-int32-buffered(Stderr, eax) +848 # . . push args +849 50/push-eax +850 68/push Stderr/imm32 +851 # . . call +852 e8/call print-int32-buffered/disp32 +853 # . . discard args +854 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp +855 # . flush(Stderr) +856 # . . push args +857 68/push Stderr/imm32 +858 # . . call +859 e8/call flush/disp32 +860 # . . discard args +861 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp +862 # . _write(2/stderr, "\n") +863 # . . push args +864 68/push Newline/imm32 +865 68/push 2/imm32/stderr +866 # . . call +867 e8/call _write/disp32 +868 # . . discard args +869 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp +870 # . syscall(exit, 1) +871 bb/copy-to-ebx 1/imm32 +872 b8/copy-to-eax 1/imm32/exit +873 cd/syscall 0x80/imm8 +874 # never gets here +875 +876 # . . vim:nowrap:textwidth=0 -- cgit 1.4.1-2-gfad0