CODINGBUG ★ A bug in the CPC464|Computing with the Amstrad) ★

A bug in the CPC464 (Computing with the Amstrad)
★ Ce texte vous est présenté dans sa version originale ★ 
 ★ This text is presented to you in its original version ★ 
 ★ Este texto se presenta en su versión original ★ 
 ★ Dieser Text wird in seiner Originalfassung präsentiert ★ 

The reason is a bug in the CPC464, which was fixed on later models. When you open a file for input or output HIMEM is automatically lowered to make room for the buffer.

As Basic's strings live just below HIMEM, these have to be copied down when HIMEM is lowered. The bug is in the routine that does this, and the cure is to fix the location of the buffer before the Basic program gets under way. If you do this the strings never have to be moved. Just add the following lines to the start of the program:

10 SYMBOL AFTER 256
15 OPENOUT"dummy"
20 MEMORY HIMEN-1
25 CLOSEOUT
30 SYMBOL AFTER 240

You can leave out the SYMBOL AFTER commands if your program doesn't redefine characters less than Ascii value 240.

CWTA

★ AMSTRAD CPC ★ A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser...

Lien(s):
» Coding » Le Bug du DEC$ sur 464
» Coding » Comment retrouver une erreur dans une ligne de Datas
» Coding » Bug du MERGE (CPC Revue)
» Coding » Le Bug de l'Openout (CPC Revue)
» Coding » Improper Argument Kaput !
» Coding » Bug , petit bug (CPC 464) (Microstrad)
Je participe au site:

» Vous avez remarqué une erreur dans ce texte ?
» Aidez-nous à améliorer cette page : en nous contactant via le forum ou par email.

CPCrulez[Content Management System] v8.7-desktop/c
Page créée en 800 millisecondes et consultée 698 fois

L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent  du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko.