Subversion Repositories Spectranet

[/] [trunk/] [include/] [zxrom.inc] - Blame information for rev 570

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 68 winston
;The MIT License
2
;
3
;Copyright (c) 2008 Dylan Smith
4
;
5
;Permission is hereby granted, free of charge, to any person obtaining a copy
6
;of this software and associated documentation files (the "Software"), to deal
7
;in the Software without restriction, including without limitation the rights
8
;to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
;copies of the Software, and to permit persons to whom the Software is
10
;furnished to do so, subject to the following conditions:
11
;
12
;The above copyright notice and this permission notice shall be included in
13
;all copies or substantial portions of the Software.
14
;
15
;THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
;IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
;FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
;AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
;LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
;OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
;THE SOFTWARE.
22
 
23
; Various entry points into the ZX Spectrum main ROM.
24
; The equ strings are essentially as found in "The Complete Spectrum ROM
25
; Disassembly", but prepended with 'ZX' so that when browsing the code
26
; it's immediately obvious where they come from.
27
 
28 376 winston
CALLBAS         equ 0x0010      ; Spectranet CALLBAS restart
29
 
30 132 winston
ZX_PRINT_A_1    equ 0x0010      ; Prints a character to the current stream
31
ZX_GET_CHAR     equ 0x0018      ; The 'collect a character' restart
32
ZX_NEXT_CHAR    equ 0x0020      ; The 'collect next character' restart
33 129 winston
ZX_GET_ERR      equ 0x007B      ; page in ROM, ld a, (hl); ret
34 132 winston
ZX_CLS_LOWER    equ 0x0D6E      ; clear the last two lines of the screen
35
ZX_ERRMSG_RET   equ 0x1349      ; return to ZX ROM print error msg routine
36
ZX_SET_MIN      equ 0x16B0      ; Reset editing areas
37
ZX_SET_WORK     equ 0x16BF      ; Clear workspace and calculator stack
38
ZX_SET_STK      equ 0x16C5      ; Clear the calculator stack
39
ZX_RECLAIM_2    equ 0x19E8      ; Reclaim bytes pointed to by HL
40
ZX_E_LINE_NO    equ 0x19FB      ; Read the line number of the line being edited
41
ZX_STMT_R_1     equ 0x1B7D      ; Fetch new line number unless a further stmt
42
ZX_STMT_NEXT    equ 0x1BF4      ; Get next statement (or finish with error C)
43
ZX_NEXT_2NUM    equ 0x1C79      ; Evaluate next 2 numbers
44
ZX_FIND_INT2    equ 0x1E99      ; Find 2 byte integer
45 376 winston
ZX_STK_FETCH    equ 0x2BF1
46
ZX_EXPT_EXP     equ 0x1C8C
47
ZX_EXPT1_NUM    equ 0x1C82
48
ZX_NEXT2_NUM    equ 0x1C79
49
ZX_FIND_INT1    equ 0x1E94
50
ZX_RECLAIM_1    equ 0x19E5
51
ZX_MAKE_ROOM    equ 0x1655
52 419 winston
ZX_CHAN_OPEN    equ 0x1601      ; Open a channel
53
ZX_PO_MSG       equ 0x0C0A      ; Print message
54
ZX_WAIT_KEY     equ 0x15D4      ; Wait for a key
55 129 winston
 
56 376 winston
; Token definitions
57
TOKEN_CODE      equ 0xAF
58
TOKEN_SCREEN    equ 0xAA
59
TOKEN_LINE      equ 0xCA
60
 
61
 
62 68 winston
; Keyboard routines.
63
ZX_KEY_SCAN     equ 0x028E      ; Finds keyboard 'scan code'
64
ZX_K_TEST       equ 0x031E      ; Tests what key is being pressed
65
ZX_K_DECODE     equ 0x0333      ; Decodes K_TEST's output into a character
66
 
67 129 winston