Initial revision
[ssr] / StraySrc / Hammer / sh / asm
1 ;
2 ; asm.s
3 ;
4 ; Assembly of instructions -- Blurg
5 ;
6 ; © 1994-1998 Straylight
7 ;
8
9 ;----- Licensing note -------------------------------------------------------
10 ;
11 ; This file is part of Straylight's Sledgehammer debugger.
12 ;
13 ; Sledgehammer is free software; you can redistribute it and/or modify
14 ; it under the terms of the GNU General Public License as published by
15 ; the Free Software Foundation; either version 2, or (at your option)
16 ; any later version.
17 ;
18 ; Sledgehammer is distributed in the hope that it will be useful,
19 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ; GNU General Public License for more details.
22 ;
23 ; You should have received a copy of the GNU General Public License
24 ; along with Sledgehammer. If not, write to the Free Software Foundation,
25 ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26
27 ;----- Overview -------------------------------------------------------------
28 ;
29 ; Functions provided:
30 ;
31 ; asm_assemble
32 ; asm_register
33
34 ; --- asm_assemble ---
35 ;
36 ; On entry: R0 == pointer to the instruction to assemble
37 ; R1 == address at which to assemble instruction
38 ;
39 ; On exit: VC and R0 == the assembled instruction
40 ; VS and R0 == pointer to an error
41 ;
42 ; Use: Assembles the given insruction, returning the result in
43 ; R0. The instruction is NOT placed into the memory location
44 ; passed in R1.
45
46 IMPORT asm_assemble
47
48 ; --- asm_register ---
49 ;
50 ; On entry: R8 == pointer into the instruction
51 ;
52 ; On exit: VS and R0 == pointer to error or
53 ; VC and R0 == number, R8 updated appropriately
54 ;
55 ; Use: Reads in a register name
56
57 IMPORT asm_register
58
59 ;----- That's all, folks ----------------------------------------------------
60
61 END