File tree Expand file tree Collapse file tree 1 file changed +39
-5
lines changed Expand file tree Collapse file tree 1 file changed +39
-5
lines changed Original file line number Diff line number Diff line change 99
1010from .. import utils
1111
12- # exit
13- def __leaf_4c (ql : Qiling ):
14- ql .log .info ("Program terminated gracefully" )
15- ql .emu_stop ()
16-
1712# write a character to screen
1813def __leaf_02 (ql : Qiling ):
1914 ch = ql .arch .regs .dl
@@ -131,6 +126,45 @@ def __leaf_43(ql: Qiling):
131126 ql .arch .regs .cx = 0xffff
132127 ql .os .clear_cf ()
133128
129+
130+ def __leaf_48 (ql : Qiling ):
131+ """Allocate memory.
132+ """
133+
134+ size = ql .arch .regs .bx * 0x10
135+
136+ # announce it but do not do anything really
137+ ql .log .debug (f'allocating memory block at { addr :#06x} to { size :#x} bytes' )
138+
139+ # success
140+ ql .os .clear_cf ()
141+
142+
143+ def __leaf_49 (ql : Qiling ):
144+ """Deallocate memory.
145+ """
146+ ...
147+
148+
149+ def __leaf_4a (ql : Qiling ):
150+ """Modify memory allocation.
151+ """
152+
153+ addr = ql .arch .regs .es
154+ size = ql .arch .regs .bx * 0x10
155+
156+ # announce it but do not do anything really
157+ ql .log .debug (f'resizing memory block at { addr :#06x} to { size :#x} bytes' )
158+
159+ # success
160+ ql .os .clear_cf ()
161+
162+
163+ def __leaf_4c (ql : Qiling ):
164+ ql .log .info ("Program terminated gracefully" )
165+ ql .emu_stop ()
166+
167+
134168def handler (ql : Qiling ):
135169 ah = ql .arch .regs .ah
136170
You can’t perform that action at this time.
0 commit comments