From c5a5d231ab161c556b848c618785a656c718061f Mon Sep 17 00:00:00 2001 From: Ivan Baravy Date: Thu, 19 Jan 2017 09:49:52 +0000 Subject: [PATCH] Move cmp* macros from cmp.inc to macros.inc We already have macros.inc, there is no reason to have another file special for cmp* macros that all fit into 7 lines. git-svn-id: svn://kolibrios.org@6832 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmp.inc | 47 --------------------------- programs/macros.inc | 8 +++++ programs/system/notify3/notify.asm | 1 - programs/system/notify3/test_ctrl.asm | 3 +- programs/system/open/open.asm | 1 - 5 files changed, 9 insertions(+), 51 deletions(-) delete mode 100644 programs/cmp.inc diff --git a/programs/cmp.inc b/programs/cmp.inc deleted file mode 100644 index a5ea74720e..0000000000 --- a/programs/cmp.inc +++ /dev/null @@ -1,47 +0,0 @@ -macro cmpe a, b, c -{ - cmp a, b - je c -} - -macro cmpne a, b, c -{ - cmp a, b - jne c -} - -macro cmpg a, b, c -{ - cmp a, b - jg c -} - -macro cmpl a, b, c -{ - cmp a, b - jl c -} - -macro cmpnl a, b, c -{ - cmp a, b - jnl c -} - -macro cmpng a, b, c -{ - cmp a, b - jng c -} - -macro cmpge a, b, c -{ - cmp a, b - jge c -} - -macro cmple a, b, c -{ - cmp a, b - jle c -} \ No newline at end of file diff --git a/programs/macros.inc b/programs/macros.inc index 1d743fa306..89b9d17a92 100644 --- a/programs/macros.inc +++ b/programs/macros.inc @@ -557,6 +557,14 @@ else end if } +; replaces /programs/cmp.inc +irp cond, e, ne, g, ng, l, nl, ge, le { + macro cmp#cond a, b, c\{ + cmp a, b + j#cond c + \} +} + ; constants ; events diff --git a/programs/system/notify3/notify.asm b/programs/system/notify3/notify.asm index f5e109ca20..43da7a56a9 100644 --- a/programs/system/notify3/notify.asm +++ b/programs/system/notify3/notify.asm @@ -4,7 +4,6 @@ dd 1, @ENTRY, @end, @memory, @stack, @params, 0 include "../../macros.inc" - include "../../cmp.inc" include "../../proc32.inc" include "../../dll.inc" ; include "../../debug.inc" diff --git a/programs/system/notify3/test_ctrl.asm b/programs/system/notify3/test_ctrl.asm index 8a31fa3e42..39e320bd20 100644 --- a/programs/system/notify3/test_ctrl.asm +++ b/programs/system/notify3/test_ctrl.asm @@ -8,7 +8,6 @@ ; include "../../debug.inc" include "../../notify.inc" include "../../string.inc" - include "../../cmp.inc" @entry: mcall 68, 11 @@ -198,4 +197,4 @@ rb 2048 @stack: - @memory: \ No newline at end of file + @memory: diff --git a/programs/system/open/open.asm b/programs/system/open/open.asm index e55dc6e175..bdc3ace6b5 100644 --- a/programs/system/open/open.asm +++ b/programs/system/open/open.asm @@ -15,7 +15,6 @@ include "../../proc32.inc" include "../../macros.inc" include "../../dll.inc" - include "../../cmp.inc" include "../../string.inc" include "../../develop/libraries/box_lib/trunk/box_lib.mac"