-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpatches.fsb
66 lines (44 loc) · 1.84 KB
/
patches.fsb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
.( Patches )
\ patches.fsb
\ This file is part of
\ Abersoft Forth disassembled
\ <http://programandala.net.en.program.abersoft_forth.html>.
\ Copyright (C) 2015 Marcos Cruz (programandala.net)
\ Copying and distribution of this file, with or without
\ modification, are permitted in any medium without royalty
\ provided the copyright notice and this notice are
\ preserved. This file is offered as-is, without any
\ warranty.
\ -----------------------------------------------------------
\ Description
\ This file modifies some patches created by modules of the
\ Afera library, in order to make the patched words the same
\ size than their original versions. Otherwise the Abersoft
\ Forth tools that create data and programs to process the
\ disassembling, would make wrong calculations.
\ -----------------------------------------------------------
\ History
\ 2015-06-01: `?STACK`.
\ 2015-06-02: `R/W`.
-->
( Repatch ?STACK )
\ `?STACK` was patched by the Afera module <lowersys.fsb>.
\ It has to be padded with `NOOP`, and `;S` has to be in its
\ original address.
HERE ] NOOP NOOP ;S [
DUP \ Origin: start of the compiled patch.
' ?STACK 28 + \ Destination.
OVER HERE SWAP - CMOVE \ Do it.
DP ! \ Free the space of the compiled patch.
-->
( Repatch R/W )
\ `R/W` was patched by the Afera main module <afera.fsb>.
\ It has to be padded with `NOOP`, `;S` has to be in its
\ original address, and its original branch must be restored.
HERE ] NOOP NOOP NOOP NOOP NOOP NOOP NOOP
1 0BRANCH [ 4 , ] NOOP NOOP NOOP ;S [
DUP \ Origin: start of the compiled patch.
' R/W 8 + \ Destination.
OVER HERE SWAP - CMOVE \ Do it.
DP ! \ Free the space of the compiled patch.
\ vim: filetype=abersoftforthafera