Search found 32 matches

by pebmeister
Sat Jan 13, 2024 12:23 am
Forum: Programming
Topic: comparing 16 bit numbers
Replies: 17
Views: 12923

Re: comparing 16 bit numbers

Just as an FYI I have made these macros that work with my assembler, but they should be compatible to others




;********************************************
;* *
;* BEQ16 *
;* *
;* 16bit beq *
;* *
;* \1 a 16-bit *
;* \2 b 16 bit *
;* \3 Destination a = b *
;* *
;* destroys a ...
by pebmeister
Fri Nov 10, 2023 7:05 am
Forum: General Discussions
Topic: Woz unwell...
Replies: 8
Views: 4962

Re: Woz unwell...

I hope he gets well. I met him a few times while working at Apple and at MacHack.
Great guy :(
by pebmeister
Wed Nov 08, 2023 2:06 am
Forum: Programming
Topic: sweet16 code on this site is incorrrect
Replies: 4
Views: 1827

Re: sweet16 code on this site is incorrrect

I now have it assembled and running with my assembler Pasm
https://github.com/pebmeister/Pasm



Processing sweet16.asm
;***********************
;* *
;* APPLE-II PSEUDO *
;* MACHINE INTERPRETER *
;* *
;* COPYRIGHT 1977 *
;* APPLE COMPUTER INC *
;* *
;* ALL RIGHTS RESERVED *
;* S ...
by pebmeister
Tue Nov 07, 2023 10:58 pm
Forum: Programming
Topic: sweet16 code on this site is incorrrect
Replies: 4
Views: 1827

Re: sweet16 code on this site is incorrrect

Thanks!
by pebmeister
Tue Nov 07, 2023 9:19 pm
Forum: Programming
Topic: sweet16 code on this site is incorrrect
Replies: 4
Views: 1827

sweet16 code on this site is incorrrect

I was porting sweet16 to a 6502 IDE that I am developing and I noticed some things that are wrong.
I took the code from here
http://www.6502.org/source/interpreters/sweet16.htm


The original article is here
https://archive.org/details/byte-magazine-1977-11-rescan/page/n152/mode/1up?view=theater ...
by pebmeister
Tue Aug 29, 2023 2:46 am
Forum: Programming
Topic: C64 ROM Address
Replies: 1
Views: 2520

C64 ROM Address

For those interested I have some files I like to share that would be useful for anyone using Assembly language for the C64
  • basic.asm - c64 basic locations
    kernal.asm - c64 kernal location
    macros.asm - general 6502 macros
    pagezeo.asm - c64 page 0 locations
by pebmeister
Tue Aug 29, 2023 2:30 am
Forum: Programming
Topic: 6502 assembler for 6502?
Replies: 17
Views: 12581

Re: 6502 assembler for 6502?

https://github.com/pebmeister/Pasm

my opensource Assembler.
supports labels, local labels, -+ labels, macros

example basic graphics wedge I wrote using it


; written by Paul Baxter

.inc "macros.asm"
.inc "pagezero.asm"
.inc "basic.asm"
.inc "kernal.asm ...
by pebmeister
Thu Dec 31, 2015 12:59 am
Forum: Programming
Topic: Functional Test for the NMOS 6502 - request for verification
Replies: 202
Views: 130421

Re: Functional Test for the NMOS 6502 - request for verifica

I don't want to hijack this thread but I have a simple question how can I get the assembler list file for the
6 5 C 0 2 E X T E N D E D O P C O D E S T E S T by Klaus Dorman

I have rewritten parts of my assembler to be almost 100% compatible with the source.
There are some minor exceptions such ...
by pebmeister
Wed Dec 09, 2015 9:43 pm
Forum: Programming
Topic: A coding challenge: prime numbers
Replies: 41
Views: 10918

Re: A coding challenge: prime numbers

Here another method. When I first created the loops the second loop max was of course the square root to the first loop index.
I noticed a pattern with the square roots
2 2 3 3 3 4 4 4 4 etc.

Using this pattern I came up with this for C.
Notice how the max of the second loop is calculated.


void ...
by pebmeister
Tue Dec 08, 2015 4:07 am
Forum: Programming
Topic: 65C02 bbrx instruction
Replies: 6
Views: 1724

Re: 65C02 bbrx instruction

If you want to give your 'c02 assembler a thorough work-out, don't forget to test the (zp) and (abs,x) modes, STZ and BIT# ... all of the yellow ones from Neil's table:

http://www.llx.com/~nparker/a2/opcodes.html

Mike B.

Here is my generated test with all possible opcodes in all possible modes ...
by pebmeister
Mon Dec 07, 2015 1:31 am
Forum: Programming
Topic: A coding challenge: prime numbers
Replies: 41
Views: 10918

Re: A coding challenge: prime numbers

I used my assembler scripting feature I can generate the primes in preprocessing :lol:
It theoretically uses 0 cycles


;***************************************
; C:\Users\Paul\Perforce\paul_Paul-PC_2148\pasm64\windows\pasms64\..\..\test\prime.a
;***************************************

.org ...
by pebmeister
Fri Dec 04, 2015 6:58 pm
Forum: Programming
Topic: Introducing a Tinkerer's Assembler for the 6502/65c02/65816
Replies: 44
Views: 14392

Re: Introducing a Tinkerer's Assembler for the 6502/65c02/65

You could also do what I have done in my assembler, I use Flex and Bison.
This makes life so much easier. A lex file sets the tokens and the bison sets the grammar.

here is my lex and bison files for my 6502/65C02 macro assembler with scripting.


Lex

%option case-insensitive yylineno noyywrap ...
by pebmeister
Fri Dec 04, 2015 3:30 pm
Forum: Programming
Topic: 65C02 bbrx instruction
Replies: 6
Views: 1724

Re: 65C02 bbrx instruction

Thanks.

I will be adding those to my test but I already know those work. I was just concerned with this particular mode.

I am writing a program that generates source code for all possible op codes in all possible modes.
by pebmeister
Fri Dec 04, 2015 3:37 am
Forum: Programming
Topic: 65C02 bbrx instruction
Replies: 6
Views: 1724

Re: 65C02 bbrx instruction

FYI here is my test file


;***************************************
; test/wintest.a
;***************************************

.C64 ; C64 output
.illegal OFF ; no illegal opcodes

.ORG $1000
; Turn on 65C02
.65C02 on

start
$1000: $DA phx phx
$1001: $5A phy phy
$1002: $0F $14 $02 bbr0 $14 ...
by pebmeister
Fri Dec 04, 2015 3:20 am
Forum: Programming
Topic: 65C02 bbrx instruction
Replies: 6
Views: 1724

Re: 65C02 bbrx instruction

Thanks for your help. I think I have it now.


* = $1000
Label1
$1000: $8F $12 $FD bbs0 $12,Label1
$1003: $8F $13 $00 bbs0 $13,Label2
Label2
$1006: $60 rts