Поперло что то, парсер смог переварить сырок cpm
допилил:
резолвы многих неоднозначностей для LL1
вычисляемые выражения для констант
несколько директив org, defb, defw
Если пруха не попустит, буду допиливать что бы sjasm сырки понимал
Вид для печати
Поперло что то, парсер смог переварить сырок cpm
допилил:
резолвы многих неоднозначностей для LL1
вычисляемые выражения для констант
несколько директив org, defb, defw
Если пруха не попустит, буду допиливать что бы sjasm сырки понимал
попался тут один кроссасм для z80 http://members.shaw.ca/gp2000/zmac.html
из СОВЕРШЕННО необычного в нем
Cycle-counting with sett, setocf pseudo-ops and t, tilo, tihi and ocf operators.
Цитата:
The best description of the T-state counting macros can be found at the end of my cycle counting tutorial. Might also explain why you would want such a feature. setocf and ocf() are newer features not covered there. They're needed when counting clock cycles on the TRS-80 Model 4 when it runs in high speed (4 MHz) mode. While the Z-80 mostly runs twice as fast in that the opcode fetch portion of each instruction is slowed down by 2 wait states. Code on the Model 1 or Model 3 (or Model 4 running in Model 3 mode) can be timed like this:
code: ld a,(de)
ld b,(hl)
add a,b
time equ t($)-t(code)
The first two instructions take 7 T-states, the 3rd 4 T-states so zmac will set time equal to 18. But if you need cycle-accurate counts on a Model 4 you'll have to do this:
code: ld a,(de)
ld b,(hl)
add a,b
time equ t($)-t(code)+2*(ocf($)-ocf(code))
As before we get a base time of 18 T-states but in this case each instruction also takes an opcode fetch thus the equation will add an additional 6 T-states and zmac will set time to 24.
При создании sna-файла sjasm прописывает в нём по адресу #4000 JP START
Как отучить его портить экран?
Destr, не видел
у меня ругается если чтото лежит в #ff00 - #ffff
вот тут норм версия http://sourceforge.net/projects/sjasmplus/
Прошу помощи, может кто смог починить проблему "Label not found" в sjasmplus:
Цитата:
AER # sh compile.sh
SjASMPlus Z80 Cross-Assembler v1.07 RC8 (build 06-11-2008)
Pass 1 complete (0 errors)
Pass 2 complete (0 errors)
Code.a80(176): error: Label not found: AER.MainCode.Logo.rnd
Pass 3 complete
Errors: 1, warnings: 0, compiled: 859 lines, work time: 0.003 seconds
Собраться помогает правка исходника AER (но считаю это не дело править работающие ранее исходники):Код:# grep rnd AER.sym.orig (эталон правильно сгенерированного файла имён)
Logo.rnd: equ 0x00005D9D
rnd: equ 0x00000000
MainCode.Logo.rnd: equ 0x00000000
# grep rnd AER.sym (то, что получается у меня без правок исходников контрольного примера - проект AER)
AER.boot.Logo.rnd: equ 0x00005D9D
rnd: equ 0x00000000
AER.MainCode.Logo.rnd: equ 0x00000000
Logo.rnd: equ 0x00000000
PS. А фичу с "." в имени hb-файлов удалось вылечить, возможно кому-то будет полезным:Код:# cat Code_a80.patch
--- Code.a80
+++ Code.a80
@@ -89,7 +89,7 @@
push bc
ld b,26
clear_one_line_loop:
- call Logo.rnd
+ call @AER.boot.Logo.rnd
ld c,a
ld a,(hl)
clear_and_operation:
Код:--- sjasm/io_trd.cpp.orig
+++ sjasm/io_trd.cpp
@@ -83,6 +83,7 @@
int TRD_AddFile(char* fname, char* fhobname, int start, int length, int autostart) { //autostart added by boo_boo 19_0ct_2008
FILE* ff;
unsigned char hdr[16], trd[31], abin[4];
+ char* last;
int i,secs,pos = 0;
aint res;
int autostart_add = autostart > 0? 4 : 0; //added by boo_boo 19_0ct_2008
@@ -165,6 +166,11 @@
}
}
+ last = fhobname + strlen(fhobname) - 1;
+ while (last > fhobname && *last != '.') {
+ --last;
+ }
+
//header of file
for (i = 0; i != 9; hdr[i++] = 0x20) {
;
@@ -175,7 +181,7 @@
if (*(fhobname + i) == 0) {
break;
}
- if (*(fhobname + i) != '.') {
+ if (*(fhobname + i) != '.' || fhobname + i < last) {
hdr[i] = *(fhobname + i); continue;
} else if (*(fhobname + i + 1)) {
hdr[8] = *(fhobname + i + 1);