diff --git a/wozmon.cc b/wozmon.cc index 95685ed..7434aa5 100644 --- a/wozmon.cc +++ b/wozmon.cc @@ -106,7 +106,8 @@ void wozmon() { uint32_t cur_addr = 0; uint32_t cur_data = 0; - char inbuf[64] = {}; + char inbuf[64]; + inbuf[0] = 0; char* inptr = inbuf; while (1) { diff --git a/wozmon.s b/wozmon.s index 64fa19e..db462f1 100644 --- a/wozmon.s +++ b/wozmon.s @@ -96,19 +96,13 @@ _ZN12_GLOBAL__N_114WriteHexNibbleEh: .global main .type main, @function main: + movw $0x8000, %sp movw %sp, %bp subw $76, %sp + movb $0, -64(%bp) leaw -64(%bp), %di - movw $64, %ax - pushw %ax - xorw %ax, %ax - movw %ax, %es - pushw %ax - pushw %di - call memset - addw $6, %sp - movw %es, %si - movw %es, -70(%bp) + xorw %si, %si + movw %si, -70(%bp) .L18: #APP ;# 11 "wozmon.cc" 1