![]() |
It is possible to read the state of the flags with basic - Printable Version +- Forum (https://www.boriel.com/forum) +-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11) +---- Forum: Help & Support (https://www.boriel.com/forum/forumdisplay.php?fid=16) +---- Thread: It is possible to read the state of the flags with basic (/showthread.php?tid=1391) |
It is possible to read the state of the flags with basic - maeloterkim - 09-07-2021 Hi ![]() In assembler there is a register that have the state of the flags zero, carry , etc It is possible to read the state of the flags ONLY WITH BASIC (NOT ASSEMBLER) or the state of the carry flag, zero flag etc RE: It is possible to read the state of the flags with basic - boriel - 09-08-2021 No, you need to use assembler (in fact it's difficult even in assembler to read the entire flag without changing them). You can get them for example: Code: DIM flags as Ubyte You can also create a function if you feel more comfortable, but will require also assembler, and I'm not sure if flags will be altered when jumping into the function: Code: function fastcall get_flags as Ubyte Perhaps you might find this useful?? ![]() RE: It is possible to read the state of the flags with basic - maeloterkim - 09-08-2021 (09-08-2021, 09:31 AM)boriel Wrote: No, you need to use assembler (in fact it's difficult even in assembler to read the entire flag without changing them). You can get them for example: thanks for the answer |