init work
This commit is contained in:
parent
3a46f91535
commit
f749b29b7b
|
@ -2,6 +2,7 @@
|
|||
|
||||
(memory RAM
|
||||
(address (#x000200 . #x001FFF))
|
||||
(type RAM)
|
||||
(section zhuge)
|
||||
(section znear)
|
||||
(section zdata)
|
||||
|
@ -18,6 +19,7 @@
|
|||
|
||||
(memory ROM
|
||||
(address (#xC00000 . #xC0FFFF))
|
||||
(type ROM)
|
||||
(section (low_rom #xC08000))
|
||||
(section code)
|
||||
(section farcode)
|
||||
|
|
|
@ -42,5 +42,17 @@ delay_y
|
|||
// Disable the on-CPU RAM
|
||||
w65c265s_sram_off
|
||||
|
||||
; Set P5.4 and P5.5 as output
|
||||
lda #0b00110000
|
||||
trb PDD5
|
||||
tsb PDD5
|
||||
trb PD5
|
||||
|
||||
; Set P6.1 as output
|
||||
lda #0b00000010
|
||||
trb PDD6
|
||||
tsb PDD6
|
||||
trb PD6
|
||||
|
||||
// And we are booted enough to jump to high ROM.
|
||||
jmp long:__program_root_section
|
|
@ -18,12 +18,15 @@
|
|||
#endif
|
||||
|
||||
#include "macros.h"
|
||||
#include "65c816.h"
|
||||
#include "w65c265s.h"
|
||||
|
||||
;;; ***************************************************************************
|
||||
;;;
|
||||
;;; __program_start - actual start point of the program
|
||||
;;;
|
||||
;;; Set up CPU stack, initialize sections and call main().
|
||||
;;; Set up CPU stack, ini
|
||||
#include "65c816.h"tialize sections and call main().
|
||||
;;; You can override this with your own routine, or tailor it as needed.
|
||||
;;; The easiest way to make custom initialization is to provide your own
|
||||
;;; __low_level_init which gets called after stacks have been initialized.
|
||||
|
@ -90,7 +93,7 @@ __call_heap_initialize:
|
|||
ldx ##.word2 (.sectionSize heap)
|
||||
lda ##.word0 (.sectionSize heap)
|
||||
jsl long:__heap_initialize
|
||||
|
||||
|
||||
wdm #0x81
|
||||
|
||||
.section code, root, noreorder
|
||||
|
|
|
@ -6,6 +6,5 @@
|
|||
// Copyright © 2024 Kyle J Cardoza <Kyle.Cardoza@icloud.com>
|
||||
|
||||
void main(void) {
|
||||
|
||||
for (;;) {}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue