This is what is done in WimBasic: Mainline code (in BLK5) LDA #LA1B5 & $FF LDY #LA1B5 >> 8 SEI STA $0314 STY $0315 CLI Interrupt service routine (in BLK5) LA1B5 ... ... ... JMP $EABF For best results, jump to $EABF at the end. No further prerequisites necessary
; .ORG $A000 .WORD <cold start vector> .WORD $FEC7 ; default NMI vector .BYTE 'A','0',$C3,$C2,$CD ; "A0CBM" signature The kernel checks for the given byte sequence at $A004 and, when found, takes the contents of $A000 <low byte> and $A001 <high byte> as the address where processing contin...
Did some more rearrangement here. Curious to know if it still works, and if there is some speed improvement. 1 poke36879,8:poke646,1:@on:@clr:dimx(32),y(32):xc=79:yc=95:n=22:v=1/8:d=3 2 xm=159:ym=191:rx=120:ry=150:zw=20:fz=15:fori=1ton:gosub7:x(i)=xa:y(i)=ya:next 3 fori=1ton:xa=x(i):ya=y(i):@0,xa,ya...
compacted and renumbered removed spaces removed Z=0 and replaced by . inline replaced D=3 by D=3/8 and removed ABS(V) replace X(I) by XA and Y(I) by YA in appropriate places (prevents array element lookups) remove X2 and Y2 calculations can't test it, unfortunately. after testing this, you could rep...
I have a TI-83 Plus, never figured it also has a Z80 aboard. There are instructions and tools (through WikiPedia) on programming assembly on this machine. Have to look into that sometime.
Hello orac81, If I can make a suggestion for a "new" assembler: why not one that optimizes automatically ? During assembly, keep a hold of the state of the machine and comment on instructions that do not affect that state. For example: if it can be known that the carry is set, then do not ...
Sometimes you want to toggle a memory location between two values. This can be done using EOR. The value to use for EOR can be constructed with eor in the assembler (operator ^ in this example) To elaborate on this, consider the following code snippet that I used in WimBasic: EOR #$82 ; token NEXT ...
Hello chysn, (I believe) the following code queries the device at #8 for the last status text and prints it. Not quite sure as I don't have the resources at hand to check it. Regards, Wim. LDA #$08 JSR $FFB4 LDA #$6F JSR $FF96 LAE3C JSR $FFA5 JSR $E742 CMP #$0D BNE LAE3C JMP $FFAB
Hello chysn, I looked for this when adding the ' autostart' function to WimBasic. First to check for the existence of the file WBSTART by trying to open and when found, load and run it. Any error (checked in $90) leads to the conclusion that file doesn't exist. So, when trying to scratch a file: jus...
Hello Sven If you want yo go ML, then you should consider doing the whole thing in integers and integer calculation. All calculation results will be in the (maybe double) byte range anyway and you wont have the float-to-integer conversions vice versa (which are relatively expensive in terms of CPU)....