Re: HBasic
Verfasst: Mi 7. Nov 2012, 23:12
Code: Alles auswählen
Bellatrix wird jetzt entspinnt :SCHRAUBEN

Retro Style Eigenbau Computer mit Parallax Propeller
https://www.hive-project.de/board/
Code: Alles auswählen
Bellatrix wird jetzt entspinnt :SCHRAUBEN
PIC18F2550 hat geschrieben:Code: Alles auswählen
mov temp2, #0 sub temp2, #160 mov temp3, Zeile loop1 add temp2, #160 djnz temp3, #loop1 add temp2, Spalte add temp2, Spalte '2x wegen wordformat
Code: Alles auswählen
mov temp2, Zeile 'x1
shl temp2, #2 'x4
add temp2, Zeile 'x5
shl temp2, #5 'x160
add temp2, Spalte
add temp2, Spalte '2x wegen wordformat
PIC18F2550 hat geschrieben:Code: Alles auswählen
add spalte, #1 cmp spalte, #80 wz if_z mov spalte, #0 if_z add zeile, #1
Code: Alles auswählen
add spalte, #1
cmpsub spalte, #80 wz
if_z add zeile, #1
Code: Alles auswählen
mov sprvm, SPRV 'Bytecode Merken
jloop
...
mov SPRV, sprvm
add SPRV, code
SPRV jmp #SPRV0 '5C 7C 00 (1B+code)
SPRV0 jmp #J0000
jmp #J0001
J0000
...
jmp #jloop
Code: Alles auswählen
command add :jmp, temp1{0..31} ' prime call
nop
:jmp jmpret $, $+1 ' call sub function
long b00, b01, b02, ... , b1F
Code: Alles auswählen
PUB start | cmd, a, b ' '
dira := %00001001_00000000_00000000_00000000 ' datenbus auf eingabe schalten
outa[27] := 1 ' handshake inaktiv
byte[$7FF0]:=0 'ckx
byte[$7FF1]:=0 'cky
byte[$7FF2]:=%111 'ckm
byte[$7FF3]:=0
byte[$7FF4]:=0
byte[$7FF5]:=0
a := startv(0, $7FF0, $7FFC) ' start vga text driver
if (a) ' VGA-Treiber geladen
...
Code: Alles auswählen
PRI startv(ScreenPtr, CursorPtr, SyncPtr) : okay | i, j, a 'io '
reg_vcfg := $200000FF + (BEL_VGABASE & %111000) << 6 ' implant pin settings
i := $FF << (BEL_VGABASE & %011000)
j := BEL_VGABASE & %100000 == 0
reg_dira := i & j
reg_dirb := i & !j
sync_cnt := cnt + $10000 ' implant CNT value to sync COGs to
font_base := @font
vf_lines.byte := vf ' implant unique settings and launch first COG
vb_lines.byte := vb
font_part := 1
if cognew(@entryv, SyncPtr) + 1
waitcnt($2000 + cnt) ' allow time for first COG to launch
vf_lines.byte := vf+4 ' differentiate settings and launch second COG
vb_lines.byte := vb-4 ' differentiate settings and launch second COG
font_part := 0
if cognew(@entryv, SyncPtr) + 1
return true
Code: Alles auswählen
' Data
screen_base long 0 ' set at runtime (3 contiguous longs)
cursor_base long $7FF0 ' set at runtime
font_base long 0 ' set at runtime