What am I doing wrong, I can simply do, poke 40960,81, and it puts 81 at location 40960, when when I compile my code and run it, and check $a000 it shows all '0's
Please help.
thanks john
Code: Select all
// text
.const SYS = $9e
.const VBLACK = 0
.const VWHITE = 1
.const VRED = 2
.const VCYAN = 3
.const VMAGENTA = 4
.const VGREEN = 5
.const VBLUE = 6
.const VYELLOW = 7
.const Border_Screen_Colours = $900F // 36879 Border and Screen colour..
.const Chr_Screen_Pointer = $9005 // 36869
.const Multi_Colour_Mode = $08 // %00001000
.const AuX_Colour_Volume = $900E // 36878
//#define VIC_UNEXPANED
//#define VIC_EXPANED3k
#define VIC_EXPANED8k
#if VIC_UNEXPANED
.print " "
.print "***** Vic 20 Unexpanded Configuation *****"
.const Vic_Basic_startup = $1001 // 4097 Basic startup
.const Vic_Screen_Memory = $1E00 // 7680 start of Screen Memory
.const Vic_Colour_Memory = $9600 // 38400 start of Colour Memory
.const MY_CODE = $100E // 4110 My Code.
.const CHARMEM = $1400 // My Graphics.
#endif
#if VIC_EXPANED3k
.print " "
.print "***** Vic 20 Expanded 3k Configuation *****"
.const Vic_Basic_startup = $0401 // 1025 Basic startup
.const Vic_Screen_Memory = $1E00 // 7680 start of Screen Memory
.const Vic_Colour_Memory = $9600 // 38400 start of Colour Memory
.const MY_CODE = $040E // 1038 My Code.
.const CHARMEM = $1400 // 5120 My Graphics.
#endif
#if VIC_EXPANED8k
.print " "
.print "***** Vic 20 Expanded 8k and above Configuation *****"
.const Vic_Basic_startup = $1201 // 4609 Basic startup
.const Vic_Screen_Memory = $1000 // 4096 start of Screen Memory
.const Vic_Colour_Memory = $9400 // 37888 start of Colour Memory
.const MY_CODE = $A000 //$4000 // $4000-6000- $120E // 4622 My Code.
.const CHARMEM = $1400 // 5120 My Graphics.
#endif
* = Vic_Basic_startup "Basic startup.." // Basic BasicUpstart(MY_CODE)
:BasicVic20startup2(MY_CODE)
*= MY_CODE "MY Main Code.."
lda #$0
sta Vic_Screen_Memory
lda #%00000111 // Yellow 7 bits 00
ora #%00001000 // Turn on Multi Colour Mode
sta Vic_Colour_Memory
lda #%00110100 // S-Cyan CHR Bits 00 B-Magenta 3 Bits 01
sta Border_Screen_Colours // 36879screen cyan + border cyan
lda #%00001111 // should be black Bits 00
sta AuX_Colour_Volume // 36879 AUX Colour and Volume
lda #%11001101
sta Chr_Screen_Pointer
here: rts
.text "the end"
//VBLACK_0-VWHITE_1-VRED_2-VCYAN_3-VMAGENTA_4-VGREEN_5-VBLUE_6-VYELLOW_7
*=CHARMEM "MY CHRSET"
.import binary "full.bin" // taken from Frak c64 3af0
END_OF_CHARMEM:
.macro BasicVic20startup2(MAIN) // Simple Macro defining start of Basic run routine.
{
.word END_OF_BASIC // END_OF BASIC, Next Line link, here end of Basic program.
.byte $0A,00 // The line number 10 for the SYS statement.
.byte SYS // SYS token $9e.
.text MY_CODE // Where is code as string. use .Text
.byte $00 // End of Basic line
END_OF_BASIC: .byte $00,$00 // End of Basic program
.print ""
.print "Basic startup " + Vic_Basic_startup
.print "END_OF_BASIC " + END_OF_BASIC
.print "start of Screen Memory " + Vic_Screen_Memory
.print "End of Screen Memory " + (Vic_Screen_Memory+506)
.print "start of My Code " + MY_CODE
.print "start of Colour Memory " + Vic_Colour_Memory
.print "start of Define Graphics " + CHARMEM
.print "END OF CHARMEM " + END_OF_CHARMEM
}