From 0eab42133afe1749043db2f1ea6075bf449d1916 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 21 Dec 2023 19:41:29 +0100 Subject: Polished the README file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 982c91a..4ef6789 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,8 @@ LIST_IT_FROM $0400 This way you don't have to care about pointers or anything: just set where you want to start iterating your list, and call `List::get` until `y` has an `$FF` -value. +value. Note though that, because of the implicit pointer arithmetic, the carry +flag and others might have been updated after you have called this function. ### Setting values without growing the list @@ -190,11 +191,15 @@ LIST_IT_FROM $0400 ;; move on... ``` +Finally, keep in mind that this function, besides updating the `a` and the `y` +registers, will also update the carry flag. + ### Putting it all together You can check out an example in the [examples/mul.s](./examples/mul.s) file. Otherwise you can also see it being used in real life on my solution for [day 4 -of Advent of Code](https://github.com/mssola/aoc2023.nes/blob/main/src/4.s). +of Advent of Code +2023](https://github.com/mssola/aoc2023.nes/blob/main/src/4.s). ## License -- cgit v1.2.3