t-edson / P65Pas

CPU 6502 Pascal Compiler/IDE/Debugger
GNU General Public License v3.0
120 stars 27 forks source link

multiplication support is not complete #12

Closed mvdhoning closed 4 years ago

mvdhoning commented 5 years ago

multiplication support is not complete in the compiler yet

t-edson commented 5 years ago

Multiplication operation is implemented in version 0.7.1. Only for byte operands. The result is a word. But if you want to make faster operations it's better to make shift and rotations. Moreover, if you want to access to a specific position in the Commodore screen, there is a fast function called: PutChar():

uses Commodore64;
var 
  row, col: byte;
begin 
  //Fill the screen with character A
  for row:=0 to 24 do
    for col:=0 to 39 do 
      PutChar(col, row, #1);
    end;
  end;
  asm rts end 
end.