<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://gbdev.gg8.se/wiki/index.php?action=history&amp;feed=atom&amp;title=ASM_Init</id>
		<title>ASM Init - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://gbdev.gg8.se/wiki/index.php?action=history&amp;feed=atom&amp;title=ASM_Init"/>
		<link rel="alternate" type="text/html" href="https://gbdev.gg8.se/wiki/index.php?title=ASM_Init&amp;action=history"/>
		<updated>2026-04-18T08:19:35Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.25.1</generator>

	<entry>
		<id>https://gbdev.gg8.se/wiki/index.php?title=ASM_Init&amp;diff=519&amp;oldid=prev</id>
		<title>Xzakox: Created page with '&lt;pre&gt;  ; GB Initialization example ; RGBDS asm source ; David Pello 2012   INCLUDE &quot;gbhw.inc&quot;        ; include GB hardware definitions  ; vBlank interrupt SECTION &quot;Vblank&quot;,HOME[$…'</title>
		<link rel="alternate" type="text/html" href="https://gbdev.gg8.se/wiki/index.php?title=ASM_Init&amp;diff=519&amp;oldid=prev"/>
				<updated>2012-12-08T16:06:08Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;&amp;lt;pre&amp;gt;  ; GB Initialization example ; RGBDS asm source ; David Pello 2012   INCLUDE &amp;quot;gbhw.inc&amp;quot;        ; include GB hardware definitions  ; vBlank interrupt SECTION &amp;quot;Vblank&amp;quot;,HOME[$…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; GB Initialization example&lt;br /&gt;
; RGBDS asm source&lt;br /&gt;
; David Pello 2012&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
INCLUDE &amp;quot;gbhw.inc&amp;quot;        ; include GB hardware definitions&lt;br /&gt;
&lt;br /&gt;
; vBlank interrupt&lt;br /&gt;
SECTION &amp;quot;Vblank&amp;quot;,HOME[$0040]&lt;br /&gt;
    reti     ; nothing, return&lt;br /&gt;
&lt;br /&gt;
; Program starts here:&lt;br /&gt;
SECTION &amp;quot;start&amp;quot;,HOME[$0100]&lt;br /&gt;
    nop&lt;br /&gt;
    jp      start&lt;br /&gt;
&lt;br /&gt;
; ROM Header (gbhw.inc macro)&lt;br /&gt;
; MBC1 mapper, 64K rom, 8K RAM&lt;br /&gt;
ROM_HEADER  ROM_MBC1_RAM_BAT, ROM_SIZE_64KBYTE, RAM_SIZE_8KBYTE&lt;br /&gt;
&lt;br /&gt;
; program begins&lt;br /&gt;
start:&lt;br /&gt;
    nop&lt;br /&gt;
    di                      ; disables interrupts&lt;br /&gt;
    ld      sp, $fffe       ; stack points to top of the high ram&lt;br /&gt;
&lt;br /&gt;
init:&lt;br /&gt;
    ; palletes&lt;br /&gt;
    ld      a, %11100100    ; pallete colors from darker to&lt;br /&gt;
                            ; lighter, 11 10 01 00&lt;br /&gt;
    ld      [rBGP], a       ; write this at the background pallete register&lt;br /&gt;
    ld      [rOBP0], a      ; and at the first sprites pallete&lt;br /&gt;
&lt;br /&gt;
    ; scroll&lt;br /&gt;
    ld      a, 0            ; write 0 to scroll registers X and Y&lt;br /&gt;
    ld      [rSCX], a       ; so visible screen is&lt;br /&gt;
    ld      [rSCY], a       ; at the top left of the background.&lt;br /&gt;
&lt;br /&gt;
; now, you can turn off the LCD and load tiles, sprites, maps, etc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Xzakox</name></author>	</entry>

	</feed>