# Super Nintendo Entertainment System (SNES)

Assembler code

```
.C0:0019 .A8
.C0:0019 .I16
.C0:0019 ; ds=0 B=0 e=0
.C0:0019
.C0:0019 ; =============== S U B R O U T I N E =======================================
.C0:0019
.C0:0019
.C0:0019 sub_C00019:                             ; CODE XREF: Emulation_mode_RESET+3↓J
.C0:0019
.C0:0019 ; FUNCTION CHUNK AT .C0:C62B SIZE 00000088 BYTES
.C0:0019
.C0:0019                 SEI
.C0:001A                 CLC
.C0:001B                 XCE
.C0:001C                 SEP     #$20 ; ' '
.C0:001E                 REP     #$10
.C0:0020                 LDX     #$15FF
.C0:0023                 TXS
.C0:0024                 LDX     #0
.C0:0027                 PHX
.C0:0028                 PLD
.C0:0029                 TDC
.C0:002A                 PHA
.C0:002B                 PLB
.C0:002C                 LDA     #1
.C0:002E                 STA     MEMSEL          ; Memory-2 Waitstate Control (0000000a a: 0 = 2.68 MHz, 1 = 3.58 MHz
.C0:0031                 STZ     MDMAEN          ; Select General Purpose DMA Channel(s) and Start Transfer (abcdefgh a = Channel 7...h = Channel 0: 1 = Enable 0 = Disable
.C0:0034                 STZ     HDMAEN          ; Select H-Blank DMA (H-DMA) Channel(s) (abcdefgh a = Channel 7 .. h = Channel 0: 1 = Enable 0 = Disable
.C0:0037                 LDA     #$8F
.C0:0039                 STA     INIDISP         ; Display Control 1 (a000bbbb a: 0=screen on 1=screen off, b = brightness)
.C0:003C                 STZ     NMITIMEN        ; Interrupt Enable and Joypad Request (a0bc000d a = NMI b = V-Count c = H-Count d = Joypad)
.C0:003F                 JSR     sub_C00525
.C0:0042                 LDX     #0
.C0:0045                 STX     D, word_7E0000
.C0:0047                 LDX     #$FFFF
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hex-rays.com/core/disassembler/disassembly-gallery/super-nintendo-entertainment-system-snes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
