mirror of
https://github.com/cc65/cc65.git
synced 2024-12-23 19:29:37 +00:00
30577253b1
git-svn-id: svn://svn.cc65.org/cc65/trunk@2776 b7a2c559-68d2-44c3-8de9-860c34a00d81
101 lines
4.3 KiB
PHP
101 lines
4.3 KiB
PHP
;/*****************************************************************************/
|
|
;/* */
|
|
;/* em-kernel.inc */
|
|
;/* */
|
|
;/* EM kernel interface */
|
|
;/* */
|
|
;/* */
|
|
;/* */
|
|
;/* (C) 2002-2003 Ullrich von Bassewitz */
|
|
;/* Römerstrasse 52 */
|
|
;/* D-70794 Filderstadt */
|
|
;/* EMail: uz@cc65.org */
|
|
;/* */
|
|
;/* */
|
|
;/* This software is provided 'as-is', without any expressed or implied */
|
|
;/* warranty. In no event will the authors be held liable for any damages */
|
|
;/* arising from the use of this software. */
|
|
;/* */
|
|
;/* Permission is granted to anyone to use this software for any purpose, */
|
|
;/* including commercial applications, and to alter it and redistribute it */
|
|
;/* freely, subject to the following restrictions: */
|
|
;/* */
|
|
;/* 1. The origin of this software must not be misrepresented; you must not */
|
|
;/* claim that you wrote the original software. If you use this software */
|
|
;/* in a product, an acknowledgment in the product documentation would be */
|
|
;/* appreciated but is not required. */
|
|
;/* 2. Altered source versions must be plainly marked as such, and must not */
|
|
;/* be misrepresented as being the original software. */
|
|
;/* 3. This notice may not be removed or altered from any source */
|
|
;/* distribution. */
|
|
;/* */
|
|
;/*****************************************************************************/
|
|
|
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
; The driver header
|
|
|
|
.struct EMD_HDR
|
|
ID .byte 3 ; Contains 0x65, 0x6d, 0x64 ("emd")
|
|
VERSION .byte 1 ; Interface version
|
|
JUMPTAB .struct
|
|
INSTALL .word ; INSTALL routine
|
|
UNINSTALL .word ; UNINSTALL routine
|
|
PAGECOUNT .word ; PAGECOUNT routine
|
|
MAP .word ; MAP routine
|
|
USE .word ; USE routine
|
|
MAPCLEAN .word ; MAPCLEAN routine
|
|
COPYFROM .word ; COPYFROM routine
|
|
COPYTO .word ; COPYTO routine
|
|
.endstruct
|
|
.endstruct
|
|
|
|
;------------------------------------------------------------------------------
|
|
; The EMD API version, stored in EMD_HDR::VERSION
|
|
|
|
EMD_API_VERSION = $00
|
|
|
|
;------------------------------------------------------------------------------
|
|
; The asm equivalent to the C em_copy structure
|
|
|
|
.struct EM_COPY
|
|
BUF .word ; Memory buffer to copy from or to
|
|
OFFS .byte ; Offset into page
|
|
PAGE .word ; Starting page to copy from or to
|
|
COUNT .word ; Number of bytes to copy
|
|
UNUSED .byte ; Make the size 8 bytes
|
|
.endstruct
|
|
|
|
;------------------------------------------------------------------------------
|
|
; Variables
|
|
|
|
.global _em_drv ; Pointer to driver
|
|
|
|
;------------------------------------------------------------------------------
|
|
; Driver entry points
|
|
|
|
.global emd_install
|
|
.global emd_uninstall
|
|
.global emd_pagecount
|
|
.global emd_map
|
|
.global emd_use
|
|
.global emd_commit
|
|
.global emd_copyfrom
|
|
.global emd_copyto
|
|
|
|
;------------------------------------------------------------------------------
|
|
; ASM functions
|
|
|
|
.global _em_unload
|
|
.global _em_install
|
|
.global _em_uninstall
|
|
.global _em_pagecount
|
|
.global _em_map
|
|
.global _em_use
|
|
.global _em_commit
|
|
.global _em_copyfrom
|
|
.global _em_copyto
|
|
|
|
|