Hi good afternoon.
how can you translate this asm file.
i don't know where to load the compiler
and how to convert from the disk.
Thank you.
greeting
;********************************************************************
;* PIXEL.MAC: externe Grafikerweiterung *
;* fuer Schneider JOYCE unter TURBO-Pascal v. August 1987 *
;********************************************************************
;
.Z80
CSEG
;
puffer equ 0C000h ;Adresse fuer Puffer
xbios equ 0FC5Ah ;Einsprungadresse fuer XBIOS
screen equ 00E9h ;Nummer der XBIOS-Funktion
;SCR_RUN_ROUTINE
roller equ 0B600h ;Anfangsadresse des Roller-RAM
;
;********************************************************************
;* UP Punkt setzen, testen, ruecksetzen *
;* was gemacht werden soll, wird ueber MODUS bekannt gegeben: *
;* 0 = ruecksetzen, 1 = setzen, sonst. = testen *
;* *
;* Parameter fuer Unterprogramme werden in *
;* Turbo ueber den Stack uebergeben *
;********************************************************************
;
pop de ;RET-Adresse holen
pop iy ;Adresse von MODUS
pop bc ;y-Koordinate
pop hl ;x-Koordinate
push de ;RET-Adresse zurueck
push hl ;x wird erst spaeter gebraucht
call div ;tzeile = y DIV 8
add hl,hl
add hl,hl
add hl,hl
add hl,hl ;tzeile = tzeile * 16
ex de,hl
ld ix,roller
add ix,de ;rolleradr. = $B600 + tzeile in IX
pop bc ;jetzt wird x benoetigt
push hl ;y mod 8 aufheben
call div ;tspalte = x DIV 8
ld a,e ;bit = x MOD 8
add hl,hl
add hl,hl
add hl,hl ;tspalte = tspalte * 8
pop de ;y mod 8 holen
add hl,de ;... + y MOD 8
ex de,hl ;tspalte in DE
ld b,a ;bit in B
or a ;bit = 0?
ld a,128
jr z,weiter
rot: srl a ;wenn Bit <> 0, Maske berechnen
djnz rot
weiter: ld bc,routine ;Adresse des Unterprogramms
call xbios ;Aufruf des XBIOS
dw screen ;XBIOS-Funktion
ret
;
routine:ld l,(ix+0) ;A = Maske, IX = Rolleradresse
inc ix
ld h,(ix+0) ;Inhalt der Rolleradr. in HL
add hl,hl ;... * 2
add hl,de ;... + tspalte
ld e,a ;maske retten
ld a,(iy+0) ;modus in A
cp 1 ;Bit setzen ?
jr z,setzen ;ja, also Bit setzen
jr nc,testen ;Inhalt von A ist groesser 1,
;also Bit testen
;Inhalt von A ist kleiner 1,
;also Bit loeschen
;
;********************************************************************
;* BIT loeschen *
;********************************************************************
;
loeschen:ld a,e ;maske zurueck in Akku
and (hl)
xor (hl)
ld (hl),a
jr ende
;
;********************************************************************
;* BIT setzen *
;********************************************************************
;
setzen: ld a,e
or (hl)
ld (hl),a
jr ende
;
;********************************************************************
;* BIT testen *
;* Ergebnis wird im L-Register *
;* zurueckgegeben, H muss 0 sein *
;********************************************************************
;
testen: ld a,e
and (hl)
ld hl,0 ;FALSE = 0
ret z ;Bit war nicht gesetzt
dec l ;TRUE = -1
ende: ret
;
;********************************************************************
;* Divisionsroutine *
;* *
;* HL=BC DIV DE *
;* DE=BC MOD DE *
;********************************************************************
;
div: ld de,8
ld hl,0
ld a,b
ld b,16
d1: rl c
rla
add hl,hl
sbc hl,de
jr nc,d2
add hl,de
d2: ccf
djnz d1
rl c
ex de,hl
ld h,a
ld l,c
ret
;
;********************************************************************
;* UP Bild speichern *
;* *
;* erwartet als Parameter aktuelle *
;* Textzeile *
;********************************************************************
;
save: pop bc ;RET-Adresse holen
pop hl ;HL = Zeile
push bc ;RET-Adresse zurueck auf Stack
ld de,roller
add hl,hl
add hl,hl
add hl,hl
add hl,hl ;Zeile * 16
add hl,de ;Zeile + rolleradr
ld bc,srout
call xbios
dw screen
ret
;
srout: ld a,(hl) ;HL = Rolleradresse der Zeile
inc hl
ld h,(hl)
ld l,a ;Inhalt vom RollerRam in HL
add hl,hl ;...* 2
ld bc,720 ;Anzahl Bytes fuer 1 Textzeile
;(90 Zeichen * 8 Bytes)
ld de,puffer ;Puffer
ldir
ret
;
;********************************************************************
;* UP Bild laden *
;* *
;* erwartet als Parameter Textzeile *
;********************************************************************
;
load: pop bc
pop hl
push bc
ld de,roller
add hl,hl
add hl,hl
add hl,hl
add hl,hl ;Zeile * 16
add hl,de ;Zeile + rolleradr
ld bc,lrout
call xbios
dw screen
ret
;
lrout: ld a,(hl)
inc hl
ld h,(hl)
ld l,a ;Inhalt von RollerRam in HL
add hl,hl ;...* 2
ld bc,720 ;Anzahl Bytes fuer 1 Textzeile
ld de,puffer
ex de,hl ;HL = Quelle, DE = Ziel im
ldir ; Bildschinnspeicher
ret
;
end
Hello,
I'm just guessing, as you don't give a lot of info.
I suspect that this piece of code is part of something, maybe the other bits on the disk you refer to would be a help.
Can you show a link to the rest of it?
The piece of .MAC I guess will need to be compiled and then positioned in RAM somewhere, maybe from &C000 and upwards. Another prog, maybe in Pascal ?) maybe needs to be at &H0100, and this prog will call the code above C000. Very similar to the BASIC progs we were looking at before.
Need to see the rest of it.
Geoff
http://cpm.jenandcal.familyds.org/cpm/mirrors/www.cirsovius.de/CPM/Projekte/Artikel/Grafik/GrafRoll/GrafRoll.html (http://cpm.jenandcal.familyds.org/cpm/mirrors/www.cirsovius.de/CPM/Projekte/Artikel/Grafik/GrafRoll/GrafRoll.html)
Hi, Thank You.
down here is the program as an asm and the PAS code to load and execute the graphic.
greeting
Hello,
Thanks for the link.
I still don't understand your reference to 'convert from the disk' - which disk are you referring to?
The article you link to seems to contain a fair bit of information, and I'd guess that it answers most of your questions, but it's in German and I understand merely the occasional word, so I cannot help much.
The links at the bottom show two other modules that go with the PIXEL-MAC bit you showed above, I'm sure there will be some hints as to getting the sections working together. Note that there is also a link within the article to an .INC (Include) for to use with the TP xompiler to enable the various facilities of GSX. I don't know how important these are to the PIXEL module, this seems to be doing graphics directly, i.e. not using GSX?
These seem to be providing a demo relating to use of the Roller RAM, which is a process built in to the PCW which provides excellent vertical scrolling (but does nothing re horizontal scroll ?).
I'll download the other two modules and see if I can make any sense of them?
Geoff