Jump to content

Search the Community

Showing results for tags 'tutorial'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Commander X16 Forums
    • Introductions
    • X16 Discussion Lounge
    • X16 Help & Support Lounge
    • Off-topic Lounge

Categories

  • Official Software
  • Official Docs
  • Community Downloads
    • Games
    • Productivity Apps
    • Graphics Apps
    • Audio Apps
    • Demos
    • Networking Apps
    • Dev Tools
    • Tutorial Apps
    • Misc Apps

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me

Found 5 results

  1. Floating Point in 6502 View File **EDITED TO ADD: for all those who are new like me, exploring this world, please see the forum thread where some of the more experienced coders here have pointed out some really useful Kernal routines which take the pain out of this!! Hi all! As I journey towards 6502 mastery (LOL), this demo explores floating point numbers and how they are stored and managed in binary. It borrows heavily from others' code to achieve what I was struggling to do from first principles, and I am grateful to all the YouTubers, bloggers and hobbyists out there who have kindly shared their work in this area. This particular routine takes a binary floating point number stored in memory and displays it on the screen in a human-readable decimal format. It also dumps some of the memory addresses involved so you can have a look under the hood. Some functions include: jsr FLTTODEC Displays the floating point number stored in MSB, NMSB, NLSB, LSB and BEXP as a decimal number on screen (PETSCII string) jsr print_mem_16 .word (addr) Memory dump. Shows paired bytes at the address, looping for MemDumpLen addresses (default=8) If you click try it now, you can poke around in memory to change the starting parameters of the programme. For example, to change the most significant byte of the mantissa, POKE $080E,XX and to change the binary exponent, POKE $081E,XX then type RUN again to see the results. FLTTODEC was adapted by me for the specific hardware of the Commander X16 from Jeff Tranter's code, who in turn adapted it for CC65 from the original appearing in Compute! issues 9 and 11, 1981 by Marvin L. De Jong. https://github.com/jefftranter/6502/blob/master/asm/wozfp/bcdfloat.s Jeff's Blog: https://jefftranter.blogspot.com/ Submitter gavinhaslehurst Submitted 01/14/21 Category Demos  
  2. Version 0.0.2

    28 downloads

    **EDITED TO ADD: for all those who are new like me, exploring this world, please see the forum thread where some of the more experienced coders here have pointed out some really useful Kernal routines which take the pain out of this!! Hi all! As I journey towards 6502 mastery (LOL), this demo explores floating point numbers and how they are stored and managed in binary. It borrows heavily from others' code to achieve what I was struggling to do from first principles, and I am grateful to all the YouTubers, bloggers and hobbyists out there who have kindly shared their work in this area. This particular routine takes a binary floating point number stored in memory and displays it on the screen in a human-readable decimal format. It also dumps some of the memory addresses involved so you can have a look under the hood. Some functions include: jsr FLTTODEC Displays the floating point number stored in MSB, NMSB, NLSB, LSB and BEXP as a decimal number on screen (PETSCII string) jsr print_mem_16 .word (addr) Memory dump. Shows paired bytes at the address, looping for MemDumpLen addresses (default=8) If you click try it now, you can poke around in memory to change the starting parameters of the programme. For example, to change the most significant byte of the mantissa, POKE $080E,XX and to change the binary exponent, POKE $081E,XX then type RUN again to see the results. FLTTODEC was adapted by me for the specific hardware of the Commander X16 from Jeff Tranter's code, who in turn adapted it for CC65 from the original appearing in Compute! issues 9 and 11, 1981 by Marvin L. De Jong. https://github.com/jefftranter/6502/blob/master/asm/wozfp/bcdfloat.s Jeff's Blog: https://jefftranter.blogspot.com/
  3. Version 0.0.4

    170 downloads

    *** THIS FILE IS ALSO NOW IN THE DEMO SECTION TO ENABLE THE "TRY IT NOW" FEATURE *** This may be of interest to absolute 6502 assembly beginners like me, although advanced 6502 programmers may cringe at the way I've done things here! This program does very little, but it is a repository of useful assembly routines for things like printing different bytes of memory (useful for debugging) as well as some basic math operations. I will keep adding to this as I progress through my assembly journey (I'm aiming to write my fractal BASIC programs in assembly). Thanks to the following YouTubers for their excellent tutorials on all things 6502: Ben Eater - YouTube Matt Heffernan - YouTube ChibiAkumas - YouTube (and also his excellent website: Assembly Tutorials: Learn 6502 Assembly Programming... With ChibiAkumas!) Function usage: (notation for cc65 assembler) jsr print .byte (list of PETSCII character codes to print, ending in a $0 byte) jsr println .byte (list of PETSCII character codes to print, ending in a $0 byte) jsr print_mem .word (start address of memory dump) Set MEMDUMPLEN to the number of addresses you wish print_mem to display.
  4. Version 0.0.4

    133 downloads

    This may be of interest to absolute 6502 assembly beginners like me, although advanced 6502 programmers may cringe at the way I've done things here! This program does very little, but it is a repository of useful assembly routines for things like printing different bytes of memory (useful for debugging) as well as some basic math operations. I will keep adding to this as I progress through my assembly journey (I'm aiming to write my fractal BASIC programs in assembly). Thanks to the following YouTubers for their excellent tutorials on all things 6502: Ben Eater - YouTube Matt Heffernan - YouTube ChibiAkumas - YouTube (and also his excellent website: Assembly Tutorials: Learn 6502 Assembly Programming... With ChibiAkumas!) Function usage: (notation for cc65 assembler) jsr print .byte (list of PETSCII character codes to print, ending in a $0 byte) jsr println .byte (list of PETSCII character codes to print, ending in a $0 byte) jsr print_mem .word (start address of memory dump) Set MEMDUMPLEN to the number of addresses you wish print_mem to display.
  5. Beginner 6502 Assembly Stuff View File This may be of interest to absolute 6502 assembly beginners like me, although advanced 6502 programmers may cringe at the way I've done things here! This program does very little, but it is a repository of useful assembly routines for things like printing different bytes of memory (useful for debugging) as well as some basic math operations. I will keep adding to this as I progress through my assembly journey (I'm aiming to write my fractal BASIC programs in assembly). Thanks to the following YouTubers for their excellent tutorials on all things 6502: Ben Eater - YouTube Matt Heffernan - YouTube ChibiAkumas - YouTube (and also his excellent website: Assembly Tutorials: Learn 6502 Assembly Programming... With ChibiAkumas!) Function usage: (notation for cc65 assembler) jsr print .byte (list of PETSCII character codes to print, ending in a $0 byte) jsr println .byte (list of PETSCII character codes to print, ending in a $0 byte) jsr print_mem .word (start address of memory dump) Set MEMDUMPLEN to the number of addresses you wish print_mem to display. Submitter gavinhaslehurst Submitted 01/12/21 Category Demos  
×
×
  • Create New...

Important Information

Please review our Terms of Use