Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Defines For RAM Sizes #2

Closed
wants to merge 2 commits into from
Closed

Conversation

Rendaman13
Copy link

No description provided.

Copy link
Member

@ISSOtm ISSOtm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the point of those equates, what would they be used for?

@Rendaman13
Copy link
Author

It's particularly helpful for loops responsible for clearing memory.

For example

memclear::
 xor a
 ldi [hl],a
 dec bc
 ld a,b
 or c
 jr nz,memclear
 ret

clearVRAM::
 ld hl,_VRAM
 ld bc,_VRAM_SIZE ; This line looks more intuitive than "ld bc,$E000-$C000"
 call memclear

@ISSOtm
Copy link
Member

ISSOtm commented Feb 28, 2019

Clearing VRAM isn't very useful, nor is WRAM - for the most part, those should be init'd separately. Also, ld bc, _SRAM - _VRAM makes as much sense, imo.

@avivace avivace closed this Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants