+nanochess Posted April 18, 2018 Share Posted April 18, 2018 Hi all. Today I got the idea of tinkering with pretty6502 my pretty printer / formatter for 6502 source code and I thought it would be nice to do same for CP1610 assembler code (the processor used in Intellivision) Typically I dismiss formatting when developing a game because I want to finish fast so this utility really helps Enjoy it! Download URL for pretty6502 v0.4 https://github.com/nanochess/pretty6502/releases Sample of code before formatting (from Princess Quest): (BTW the left side had Tab and space mix/match causing horizontal deviation in TextEdit but for some reason it doesn't happen here) ; ; Se prepara para secuencia de victoria ; CALL secuencia_final MVII #victoria_1,R0 MVII #$0218,R1 MVII #$0c,R2 CALL copia_pantalla MVII #victoria_2,R0 MVII #$022c,R1 MVII #$0c,R2 CALL copia_pantalla MVII #300,R0 @@5: PSHR R0 CALL actualiza_sprites CALL espera_cuadro CALL mueve_monigotes PULR R0 DECR R0 BNE @@5 MVII #victoria_3,R0 MVII #$0253,R1 MVII #$0e,R2 CALL copia_pantalla MVII #500,R0 @@15: PSHR R0 CALL espera_cuadro PULR R0 DECR R0 BNE @@15 After pretty printing it: ; ; Se prepara para secuencia de victoria ; CALL secuencia_final MVII #victoria_1,R0 MVII #$0218,R1 MVII #$0c,R2 CALL copia_pantalla MVII #victoria_2,R0 MVII #$022c,R1 MVII #$0c,R2 CALL copia_pantalla MVII #300,R0 @@5: PSHR R0 CALL actualiza_sprites CALL espera_cuadro CALL mueve_monigotes PULR R0 DECR R0 BNE @@5 MVII #victoria_3,R0 MVII #$0253,R1 MVII #$0e,R2 CALL copia_pantalla MVII #500,R0 @@15: PSHR R0 CALL espera_cuadro PULR R0 DECR R0 BNE @@15 There are several options for formatting available, trying to fit all styles 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.