gpt-3.5-turbo-0125· OpenAI
WildChat-4.8M (AI2)
Can you tell me 6502 atari assembler source code for keep code running after OS reset?…
- User
Can you tell me 6502 atari assembler source code for keep code running after OS reset? Keep in mind that OS ROM is active.
- Assistant
Sure, here is an example of 6502 assembly code that can be used to keep your code running after an OS reset on an Atari system with the OS ROM active:
assembly; Set the reset vector to jump to our code instead of the OS ROM .org $FFFC .word Start .org $2000 Start: sei ; Disable interrupts lda #$40 ; Load the address of the OS reset routine sta $FFFE ; Override the first byte of the reset vector with the address of our code lda #$20 ; Load the second byte of the OS reset routine address sta $FFFF ; Override the second byte of the reset vector with the address of our code cli ; Enable interrupts ; Your code here ; This code will now run after an OS reset rts ; Return from the subroutine
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.