Jump to content

Search the Community

Showing results for tags 'assembly language'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Atari Systems
    • Atari 2600
    • Atari 5200
    • Atari 7800
    • Atari Lynx
    • Atari Jaguar
    • Dedicated Systems
    • Atari 8-Bit Computers
    • Atari ST/TT/Falcon Computers
  • Gaming General
  • Marketplace
  • Community
  • Game Programming
  • Site
  • Classic Gaming News
  • The Club of Clubs's Discussion
  • I Hate Sauron's Topics
  • 1088 XEL/XLD Owners and Builders's Topics
  • Atari BBS Gurus's Community Chat
  • Atari BBS Gurus's BBS Callers
  • Atari BBS Gurus's BBS SysOps
  • Atari BBS Gurus's Resources
  • Atari Lynx Programmer Club's CC65
  • Atari Lynx Programmer Club's ASM
  • Atari Lynx Programmer Club's Lynx Programming
  • Atari Lynx Programmer Club's Music/Sound
  • Atari Lynx Programmer Club's Graphics
  • The Official AtariAge Shitpost Club's Shitty meme repository
  • The Official AtariAge Shitpost Club's Read this before you enter too deep
  • Arcade Gaming's Discussion
  • Tesla's Vehicles
  • Tesla's Solar
  • Tesla's PowerWall
  • Tesla's General
  • Harmony/Melody's CDFJ
  • Harmony/Melody's DPC+
  • Harmony/Melody's BUS
  • Harmony/Melody's General
  • ZeroPage Homebrew's Discussion
  • Furry Club's Chat/RP
  • PSPMinis.com's General PSP Minis Discussion and Questions
  • PSPMinis.com's Reviews
  • Atari Lynx 30th Birthday's 30th Birthday Programming Competition Games
  • 3D Printing Club's Chat
  • Drivers' Club's Members' Vehicles
  • Drivers' Club's Drives & Events
  • Drivers' Club's Wrenching
  • Drivers' Club's Found in the Wild
  • Drivers' Club's General Discussion
  • Dirtarians's General Discussion
  • Dirtarians's Members' Rigs
  • Dirtarians's Trail Runs & Reports
  • Dirtarians's Wrenching
  • The Green Herb's Discussions
  • Robin Gravel's new blog's My blog
  • Atari Video Club's Harmony Games
  • Atari Video Club's The Atari Gamer
  • Atari Video Club's Video Game Summit
  • Atari Video Club's Discsuuions
  • Star Wars - The Original Trilogy's Star Wars Talk
  • DMGD Club's Incoming!
  • DASM's General
  • AtariVox's Topics
  • Gran Turismo's Gran Turismo
  • Gran Turismo's Misc.
  • Gran Turismo's Announcements
  • The Food Club's Food
  • The Food Club's Drinks
  • The Food Club's Read me first!
  • The (Not So) Official Arcade Archives Club's Rules (READ FIRST)
  • The (Not So) Official Arcade Archives Club's Feedback
  • The (Not So) Official Arcade Archives Club's Rumor Mill
  • The (Not So) Official Arcade Archives Club's Coming Soon
  • The (Not So) Official Arcade Archives Club's General Talk
  • The (Not So) Official Arcade Archives Club's High Score Arena
  • Adelaide South Australia Atari Chat's General Chat & Welcome
  • Adelaide South Australia Atari Chat's Meets
  • Adelaide South Australia Atari Chat's Trades & Swaps
  • KC-ACE Reboot's KC-ACE Reboot Forum
  • The Official Lost Gaming Club's Lost Gaming
  • The Official Lost Gaming Club's Undumped Games
  • The Official Lost Gaming Club's Tip Of My Tounge
  • The Official Lost Gaming Club's Lost Gaming Vault
  • The Official Lost Gaming Club's Club Info
  • GIMP Users's Discussion

Blogs

There are no results to display.

There are no results to display.

Calendars

  • AtariAge Calendar
  • The Club of Clubs's Events
  • Atari BBS Gurus's Calendar
  • ZeroPage Homebrew's Schedule

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website


Facebook


Twitter


Instagram


YouTube


eBay


GitHub


Custom Status


Location


Interests


Currently Playing


Playing Next

Found 15 results

  1. I'm thinking of using these routines I wrote to read/write VDP RAM. Are there any obvious errors? I was thinking of using them to avoid the BLWP that the TI routines use, along with the lack of zero-byte-count checking. These can also sit in the 16-bit workspace that C99 uses. Forgot to mention that these routines are called with BL @VSPEEK, BL @VSPOKE, BL @VMPEEK, BL @VMPOKE. I used these names to avoid conflicts with the Ed-Assem loader. K-R. * vdp.i (TI-name "VDP;I") */ * C'99 Rev#5.1.CC (C)1994 Clint Pulley & Winfried Winkler ***** VDP RAM read/write routines. ***** * File-name pointer is in R8. * External REFerences for TI linker. REF VDPWA,VDPWD,VDPDD * Address definitions to allow these * routines to function without the * TI linker. * * Read VDP data from this address. *VDPRD EQU >8800 * * Read VDP status from this address. *VDPSTA EQU >8802 * * Write VDP data to this address. *VDPWD EQU >8C00 * * Write VDP command or RAM-address * to this address. *VDPWA EQU >8C02 VMPEEK * Get multiple bytes from VDP RAM and * place them in CPU RAM. * R0 = VDP RAM start address. * R1 = CPU RAM start address. * R2 = Byte count. * Save caller's return address on stack. DECT R14 MOV R11,*R14 * Check count for zero. The TI routine * does not check for this. MOV R2,R2 JEQ VMEXIT * If zero, exit. * Save caller's registers. DECT R14 MOV R2,*R14 DECT R14 MOV R1,*R14 DECT R14 MOV R0,*R14 * Set VDP read-address. ANDI R0,>3FFF BL @VMADDR VMLOOP * Get VDP data and place in * caller's buffer. MOVB @VDPRD,*R1+ * Done? If not, get another byte. DEC R2 JNE VMLOOP * Restore caller's registers. MOV *R14+,R0 MOV *R14+,R1 MOV *R14+,R2 VREXIT * Restore caller's return address, * then exit. MOV *R14+,R11 B *R11 VMPOKE * Send multiple bytes from CPU RAM * and place them in VDP RAM. * R0 = VDP RAM start address. * R1 = CPU RAM start address. * R2 = Byte count. * Save caller's return address on stack. DECT R14 MOV R11,*R14 * Check count for zero. The TI routine * does not check for this. MOV R2,R2 JEQ VMEXIT * If zero, exit. * Save caller's registers. DECT R14 MOV R2,*R14 DECT R14 MOV R1,*R14 DECT R14 MOV R0,*R14 * Set VDP read-address. ANDI R0,>3FFF ORI R0,>4000 BL @VMADDR VMLOOP * Get VDP data and place in * caller's buffer. MOVB *R1+,@VDPWD * Done? If not, get another byte. DEC R2 JNE VMLOOP * Restore caller's registers. MOV *R14+,R0 MOV *R14+,R1 MOV *R14+,R2 VWEXIT * Restore caller's return address, * then exit. MOV *R14+,R11 B *R11 VSPEEK * Get a byte from VDP RAM and place * in R1 MS byte. * * R0 = VDP RAM address. * R1 (MS Byte) = Data byte. * Save caller's return address on stack. DECT R14 MOV R11,*R14 * Save caller's registers. DECT R14 MOV R1,*R14 DECT R14 MOV R0,*R14 * Set VDP read-address. ANDI R0,>3FFF BL @VMADDR * Get VDP data and place in * caller's R1 MS byte. MOVB @VDPRD,R1 * Restore caller's registers. MOV *R14+,R0 MOV *R14+,R1 * Restore caller's return address, * then exit. MOV *R14+,R11 B *R11 VSPOKE * Send byte in R1 MS byte to VDP RAM. * R0 = VDP RAM address. * R1 (MS Byte) = Data byte. * Save caller's return address on stack. DECT R14 MOV R11,*R14 * Save caller's registers. DECT R14 MOV R1,*R14 DECT R14 MOV R0,*R14 * Set VDP read-address. ANDI R0,>3FFF ORI R0,>4000 BL @VMADDR * Get VDP data and place in * caller's buffer. MOVB R1,@VDPWD * Restore caller's registers. MOV *R14+,R0 MOV *R14+,R1 * Restore caller's return address, * then exit. MOV *R14+,R11 B *R11 VMADDR * Send address to VDP. * This routine expects address in R0. * Send LS byte of address. SWPB R0 MOVB R0,@VDPWA * Send MS byte of address. SWPB R0 MOVB R0,@VDPWA * Return to caller. B *R11 EVEN K-R. VDP.i
  2. Please reference Chapter 4 of https://ia800307.us.archive.org/10/items/9900MicroprocessorSeriesFamilySystemsDesignDataBook/TexasInstruments9900MicroprocessorSeriesFamilySystemsDesign_text.pdf Starting with page 4-89 and particularly pages 4-91, 4-92, 4-95 and 4-100 The following code sequence appears to take 29 machine cycles: mov @Var,R0 ; 11 cycles ai R0,2 ; 7 cycles mov R0,@Var ; 11 cycles While this only takes 9: inct @Var ; 9 cycles Am I correct? If so, there would appear to be plenty of opportunities for a compiler to optimize code like this.
  3. For use in my raycaster project, I present this challenge: write the fastest possible routine to copy any number of bytes (even or odd) from any address in CPU memory (even or odd) to any other address in CPU memory (even or odd). The ability to handle both odd and even addresses is essential, and exactly the specified number of bytes must be copied. There is no need to support overlapping memory regions. Self-modifying code is acceptable. Here is what I'm after, only faster: * r0: source, r1: destination, r2: count copy: movb *r0+,*r1+ dec r2 jne copy rt
  4. As mentioned in another thread, the following code to add a small constant to a variable: 00037 * W0 := W0 + 2; 00038 00039 * * 0 := v W0 -> 1 00040 * * 1 L r 2 00041 00042 * * 2 L v W0 -> 3 00043 * * 3 + c 2 00044 00045 00046 * 1 L r 2 00047 * 2 L v W0 -> 3 00048 * 3 + c 2 0052 C020 002E 00049 mov @W0,R0 0056 05C0 00050 inct R0 00051 * 0 := v W0 -> 1 0058 C800 002E 00052 mov R0,@W0 can be optimized to this: 00037 * W0 := W0 + 2; 00038 00039 * * 0 := v W0 -> 1 00040 * * 1 L r 2 00041 00042 * * 2 L v W0 -> 3 00043 * * 3 + c 2 00044 00045 00046 * 1 L r 2 00047 * 2 L v W0 -> 3 00048 * 3 + c 2 0052 05E0 002E 00049 inct @W0 00050 * 0 := v W0 -> 1 This is the code to add two signed bytes resulting in a 16-bit number. Is there a better way to do sign extension? 00037 * W0 := S1 + S2; 00038 00039 * * 0 := v W0 -> 1 00040 * * 1 L r 2 00041 00042 * * 2 L v S1 -> 3 00043 * * 3 + v S2 00044 00045 00046 * 1 L r 2 00047 * 2 L v S1 -> 3 00048 * 3 + v S2 0052 04C0 00049 clr R0 0054 D020 0037 00050 movb @S1,R0 0058 1502 (005E) 00051 jgt 2f 005A 0260 00FF 00052 ori R0,>FF 005E 00053 2 005E 06C0 00054 swpb R0 0060 04C1 00055 clr R1 0062 D060 0038 00056 movb @S2,R1 0066 1502 (006C) 00057 jgt 2f 0068 0261 00FF 00058 ori R1,>FF 006C 00059 2 006C 06C1 00060 swpb R1 006E A001 00061 a R1,R0 00062 * 0 := v W0 -> 1 0070 C800 002E 00063 mov R0,@W0
  5. Does anyone here write unit tests for your Assembly Language projects? What is your preferred coding format for doing so? The below is my approach. ARYINS is the routine being tested. AEQ and ANEQ stand for "Assert Equal" and "Assert Not Equal", respectively. They are comparing the contents of R0 and R1. * * Insert an element at the middle of * an array. * Grow array and move it. * No empty block follows the original. INS5 * Arrange LI R0,INS5Y MOV R0,@BUFADR LI R0,INS5Z MOV R0,@BUFEND * Act LI R0,INS5X+2 LI R1,3 BLWP @ARYINS MOV R0,R9 MOV R1,R10 * Assert LI R0,INS5X+2 MOV R9,R1 BLWP @ANEQ TEXT 'Array should have moved.' BYTE 0 EVEN * MOV R9,R0 AI R0,4+12 MOV R10,R1 BLWP @AEQ TEXT 'Element address should be ' TEXT 'directly after the third ' TEXT 'element.' BYTE 0 EVEN . . . RT
  6. I just posted my latest project that provides a BASIC XL program for interacting directly with the 6502 processor registers through a simple point-and-click interface controlled by the joystick. I have been working on this program for my planned exhibit at VCF East in April, but that has been postponed until October. I am pretty happy with how this turned out. Note that this is not a simulation. Each click calls an assembly language program that runs the op code. Comments welcome! http://atariprojects.org/2020/03/14/interact-with-ataris-6502-processor-in-basic-10-15-mins/ i6502.txt i6502.atr
  7. I need to add two 16-bit integers (let's call them A and B; A is signed, B isn't) and get the result, less 1. Sure I can do a 16-bit decrement on the result of the addition, but 16-bit DECs require a branch instruction (for MSB roll-over) and I'm trying to save cycles. I considered using a 256 byte look up table of the index value less 1, but this comes unstuck when then LSB is zero, since element 0 is $FF: ldx a lda Less1Tab,x clc adc b sta c lda a+1 adc b+1 sta c+1 rts Less1Tab .byte $FF ?Value = $0 .rept 255 .byte ?Value ?Value = ?Value+1 .endr Making the first element of the LUT $FF seemed like a great idea until I realized it sets the carry flag when subtracting 1 from 0, messing up the MSB. Any more complex and it'll be easier to DEC the result. Any ingenious ideas?
  8. I recently dug out my Atari 7800 7800 Monitor Cartridge that I bought from Video 61 in August 2000. It's been quite a few years since I've messed around with it. I was showing a friend of mine how it worked. We looked at the three demo programs that are on it (Bumper Tanks, Hex Demo and Color Display), plus we typed in a couple of the very short demonstration programs and tried those too. I suppose that after nearly 20 years the battery in the cartridge that saves the RAM is dead, but I'd still like to play around with this rare cartridge and maybe make a video of it in use since I can't even find video of anyone using it (not even pictures or screenshots of the three demo programs on it). I know that the manual for the 7800 Monitor Cart isn't freely available. This is a shame, as this certainly would get more people interested in the program. I wonder if Video 61 would allow, at least, the manual to be released as a pdf? Did anyone ever write any short subroutines that I could type into this machine language monitor using those trusty keyboard controllers? Are there any generic 7800 programs that I could use with the Monitor carts? Adam
  9. Hey everybody, I apologize if anyone has asked these question before -- I tried searching with limited success. I am working on writing a roguelike for the INTV, now using IntyBASIC ideally to be part of the contest. The problem is that the program I want to write, including its art assets, is kind of huge and unwieldy and I have genuine worries that I'm not going to be able to cram everything I'd like into the address space. The IntyBASIC manual has this to say about the subject: The memory_map.txt file in the SDK, however, has what appears to be a much larger selection of addresses: So, the questions I have: Does IntyBASIC attach to the areas listed in the memory map but not listed in its documentation ($4000-$4FFF, $7000-$7FFF, $8040-$9FFF) in order to store variables? What about its prologue/epilogue routines? Clearly those routines have to go somewhere, but I'm a little confused about what determines where they show up. The prologue looks like it starts at $5000 and it looks like the epilogue is using some of the address space in the $4000 block to store some routines, but is there any extra space that can be squeezed out of these areas? There is no ORG directive at the beginning of the epilogue. Do those routines just go wherever the compiler's location counter happens to be pointing when it goes to include this? Will I need to worry about the epilogue writing itself to bizarre or inappropriate places if my code stops near one of the memory boundaries, or will the BASIC compiler make sure that doesn't happen? Where is the entry point for IntyBASIC programs? I'd like to make a custom title screen if possible. If I start my program with ASM ORG $7000, will it begin execution there and bypass the EXEC? (Does IntyBASIC need the EXEC?) I noticed that there's some code at $4800 in the epilogue pertaining to the Intellivoice, but it looks like it may not be present if the Intellivoice isn't used. (I realize half the reason for using BASIC instead of assembly language is to not have to worry about fiddly details like this, but I want to make good, appropriate decisions about how to organize my program and figure out what all I will be able to include as far as assets go before I begin any major coding.) Thanks a bunch!
  10. I know this is very elementary, but I have a couple simple questions for you guys. LOOP BLWP @VSBW INC R0 DEC R2 JNE LOOP How does JNE know to look at R2 here... is it the fact that R2 was the last register referred to in the source? For instance, if the code was written: DEC R2 INC R0 JNE LOOP Then would JNE look at R0? I don't have any reference material on me right now, and my slow-ass tethered internet is not allowing me to DL anything to help me out. Sorry. =) **I have a couple more questions as well, but I'm going to read through the assembly threads on here before I start asking questions which have already been answered. This forum is amazing for knowledge. =)
  11. Folks: Hi ho, Apple users. I have a few Apple programming guidebooks which I am putting up on Ebay. Some are already up, some more are going up today/this week. I play around with TI and Commodore, but not Apple, so I don't have a whole lot of use for them, though they are great books. Putting most of them up for around $10. Not really trying to make bank on these, just picking up a little cash for a few toys Santa seemingly forgot to bring. ^_^ I also have a random Tandy 1400HD power supply and a Vtech LCD Talking Baseball game up. Tandy PS is tested and working, but having no Tandy 1400HD, etc etc. Talking Baseball is ubercheese but the voice cracks me up. Auctions: Beginners guide to Apple II assembly language eBay Auction -- Item Number: 201013141026 Nibble Expresses -collected snippets and code for Apple from Nibble Magazine, 150-200 pages each eBay Auction -- Item Number: 201013138578 eBay Auction -- Item Number: 201013136901 eBay Auction -- Item Number: 201013074044 eBay Auction -- Item Number: 201013308513 eBay Auction -- Item Number: 201013307938 More Apple Secrets from nibble eBay Auction -- Item Number: 201013311895 (Edit - More added) Applesoft BASIC Toolbox eBay Auction -- Item Number: 201013314361 Basic Apple BASIC (Integer & Applesoft FP) eBay Auction -- Item Number: 201013312998 I'll be adding a few more books to the above in the near future. Tandy 1400HD power supply eBay Auction -- Item Number: 201006101600 Vtech talking baseball eBay Auction -- Item Number: 201011770776
  12. Hi guys, New to the site but, a longtime vcs fanatic. I also play OSU! on my spare time as i love elite beat agents. I was wondering how difficult it would be to create a simple port of Osu!. Here is a small video of it in action. I have been reading andrews assembly language tutorials and know some assembly language. I also own a an Atari 2600 and Harmonary cart. From read the technical specs, it looks like i will have to simplify it quite a bit. Can someone please tell me the feasibility of this? Any assistance in this matter would be greatly appreciated. Sincerely, Vcsu!
  13. Here's a funny little perl script I made that tries to find the offset in the OS ROM of all values between 0-FFFF, generating the required equates. It expects that a binary file with the TI-99/4A OS ROM (not GROM!) is available in the current directory. NOTE: Due to lincense issues, I can't share the TI-99/4A ROM image. However if you are using MESS for emulating the TI-99/4A you already have it. Click on the spoiler button for viewing the source code. EDIT: Somehow the formatting gets screwed when copying it into atariage, stange. Oh well, you get the idea. I tried it using activestate perl on windows, but suppose it should run the same with plain vanilla perl on linux. So what is this good for? It can save you a few data statements in your assembly language program, if the value you want to access is already present in the OS ROM. Also due to the fact that the OS ROM is 16bit, there is no speed penalty. The main reason for me implementing this is to make the spectra2 library a bit smaller by removing unnecessary data statements, squeezing the most out of the 8K cartridge ROM space. The below equates files were produced by the script. The first one is the hex version and the second one is the decimal version. In the value range 0-FFFF, 1632 mathing values were found. Not bad considering this is only a 8K ROM. tiromequh.asm tiromequd.asm Note that the Asm994a assembler chokes with a "Out of symbol table space" when both files are included, but works fine if only using one of both. As far as I know all TI-99/4A revisions used the same OS ROM, this was already discussed here on Atariage about a year ago.
  14. I rolled up a quick-n-dirty simple retro birthday card for a friend. (No music. Maybe for next year's card.) (And, No, FillInTheBlank is not their actual name. ) Assembly code. Redefined character sets do the animated flames. Display kernel updating colors on every scan line. lots of laziness in evidence. Too lazy to actually do a VBI or DLI. Assembly code is here if anyone is interested: https://github.com/kenjennings/WIP-HBFITB Video is on youTube: https://youtu.be/WLELDFDT3uM
  15. I could probably work this out with enough time, but I guess that enough of you clever people know how to do something like this.... I have an integer stored as a byte which can be a value of between 0 and 99 inclusive. I then want to create a filename, so I need this number as text. If the integer is between 0 and 9 inclusive, I would like to print it as "07" (i.e. a zero at the start). If the integer is greater than 9 and will always be less than 100, I just want the number as the 1st 2 bytes of the filename. I want some compact code to do this, could I use CIOV somehow? Or can I do better with your code?
×
×
  • Create New...