2006-07-13

Burning Tools

cdburn

Because I re-partition my disc and re-install my Windows box, so I was stay in Win32 environment for setting.


Some neat utilities I prefer, like the burning CD tools. Today, I found the CDBurn.exe by Google, it's made in M$, project named "Windows Server 2003 Resource Kit Tools", and found this information in "How can I write ISO files to CD?".


So that now, I using it to burn out the Ubuntu Linux 6.06 CD for installing my Linux box later. ;)


An other tool as I found, "CreateCD"

2006-07-12

ISO Tools

Today, I bough a joy stick to play game, include "Silent Hill" and "MapleStory" or Hafe Life".

The Silent Hill 3 that I download ISO file, thus I need to mount it then install and play it. First, I try to install the "Alcohol 50%", it's a simple version with "Alcohol 120%", without the burn CD/DVD function, and it has non-registry. Both 50% and 120% are can generate ISO file.

Second, I installed the "WinISO", but it seems older than "IsoBuster", and WinISO cannot edit files which more than 2GB, but IsoBuster can satisfied.

Finally, I tried the "DAEMON tools", it seems as the same principle like Alcohol, 'cuz durning the install procedure, it prompts a warning dialog, said something like, "If u install this program, maybe ur debugger, like ICE... cannot run well.". Ya... u know, in Unix-Like OSes, we can mount ISO file as a file node, for genernal at /mnt. Maybe these tools also did like Unix-Like.

"Daemon tools" doesn't need to registry and has no prompt dialog, haha, it's good for me, 'cuz the dialog is really really bother me... even everyone except the Darmon tool TEAM. :P


Thus... I pick and choose the "Daemon Tools" for mount ISO files. Maybe after this moment, I need to programs which support burn out a ISO files and NO REGISTRY DIALOG.

:D :D

2006-07-11

Meeting Log

Mine

.equ WTCON, 0x01d30000
.equ WTCON, 0x01d30000
.equ PCONE, 0x01d20028
.equ LOCKTIME, 0x1d8000c
.equ PLLCON, 0x01d80000
.equ CLKCON, 0x01d80004


.globl start
start:
b reset
add pc, pc, #0x0c000000
add pc, pc, #0x0c000000
add pc, pc, #0x0c000000
add pc, pc, #0x0c000000
add pc, pc, #0x0c000000
add pc, pc, #0x0c000000
add pc, pc, #0x0c000000



The seven times of add action, it brings PC out to INTERRUPT AREA, avoid to excute the interrupt vector.

Our next step is getting to Linux-based tutorial. It's so happy to meet these nonOS tutorial, and we consider that these advance sections should be study later, except advisor indicated LED section.


NOTE: The UNet ICE can use in Embest 2005 Pro.

2006-07-05

__divsi3

When we hacking C code, found that c code in the disassembly window, the for() loop was be translated to __divsi3. Thus, we hacking the "__divsi3" in the cygwin.

After I hacked the gcc-core source code, at gcc-4.1.1/gcc/config/ia64/lib1funcs.asm, as below:


---

#ifdef L__divsi3
// Compute a 32-bit integer quotient.
//
// From the Intel IA-64 Optimization Guide, choose the minimum latency
// alternative.
//
// in0 holds the dividend. in1 holds the divisor.

.text
.align 16
.global __divsi3
.proc __divsi3
__divsi3:
.regstk 2,0,0,0
// Check divide by zero.
cmp.ne.unc p0,p7=0,in1
sxt4 in0 = in0
sxt4 in1 = in1
;;
setf.sig f8 = in0
setf.sig f9 = in1
(p7) break 1
;;
mov r2 = 0x0ffdd
fcvt.xf f8 = f8
fcvt.xf f9 = f9
;;
setf.exp f11 = r2
frcpa.s1 f10, p6 = f8, f9
;;
(p6) fmpy.s1 f8 = f8, f10
(p6) fnma.s1 f9 = f9, f10, f1
;;
(p6) fma.s1 f8 = f9, f8, f8
(p6) fma.s1 f9 = f9, f9, f11
;;
(p6) fma.s1 f10 = f9, f8, f8
;;
fcvt.fx.trunc.s1 f10 = f10
;;
getf.sig ret0 = f10
br.ret.sptk rp
;;
.endp __divsi3
#endif

---

Inside of the "config" sub-directory, there has more plaform implement the __divsi3 function. Thus, many platform need the function, but used different their assembly instruction.

--
a2n@ubuntu-en:config$ grep -r "__divsi3" *
alpha/alpha.c: /* Prevent gcc from generating calls to __divsi3. */
arc/lib1funcs.asm: .global ___divsi3
arc/lib1funcs.asm:___divsi3:
arm/lib1funcs.asm: bl SYM(__divsi3)
arm/lib1funcs.asm: bl SYM(__divsi3)
bfin/lib1funcs.asm:.global ___divsi3;
bfin/lib1funcs.asm:.type ___divsi3, STT_FUNC;
bfin/lib1funcs.asm:___divsi3:
bfin/lib1funcs.asm: CALL ___divsi3;
divmod.c:__divsi3 (long a, long b)
h8300/lib1funcs.asm: .global ___divsi3
h8300/lib1funcs.asm:___divsi3:
h8300/h8300.c: "__divsi3",
ia64/lib1funcs.asm:#ifdef L__divsi3
ia64/lib1funcs.asm: .global __divsi3
ia64/lib1funcs.asm: .proc __divsi3
ia64/lib1funcs.asm:__divsi3:
ia64/lib1funcs.asm: .endp __divsi3
ia64/ia64.c: set_optab_libfunc (sdiv_optab, SImode, "__divsi3");
ia64/t-ia64: __divsi3 __modsi3 __udivsi3 __umodsi3 __save_stack_nonlocal m32c/m32c-lib2.c:SItype __divsi3 (SItype a, SItype b);
m32c/m32c-lib2.c:__divsi3 (SItype a, SItype b)
m68k/lb1sf68.asm: .globl SYM (__divsi3)
m68k/lb1sf68.asm:SYM (__divsi3):
m68k/lb1sf68.asm: PICCALL SYM (__divsi3)
mt/lib2extra-funcs.c:__divsi3 (SItype a, SItype b)
stormy16/stormy16-lib2.c:extern SItype __divsi3 (SItype, SItype);
stormy16/stormy16-lib2.c:__divsi3 (SItype a, SItype b)
v850/lib1funcs.asm: .globl ___divsi3
v850/lib1funcs.asm: .type ___divsi3,@function
v850/lib1funcs.asm:___divsi3:
v850/lib1funcs.asm: .size ___divsi3,.-___divsi3
v850/lib1funcs.asm: jarl ___divsi3,r31
xtensa/lib1funcs.asm: .global __divsi3
xtensa/lib1funcs.asm: .type __divsi3,@function
xtensa/lib1funcs.asm:__divsi3:
xtensa/lib1funcs.asm: .size __divsi3,.-__divsi3
--

2006-07-03

Meeting Log

My slide
howls'


TODO for Wed.:

*Reinforcing the script section, add Memory Layout from the lecture of china.
*Replacing "CS :: Example" by more complete example, better for demo and present.


Meeting note:
*Thumb mode
--

.arm
adr r0, Tstart +1
bx r0

.thumb
Tstart:
[...]

--
16-bit data line mode {00, 01}, {10, 11}, the MSB bit is exange by "0" and "1". 32-bit is {00, 01, 10, 11}, {100, 101, 110, 111}. The default mode is .arm, thus load the instruction to memory by 3-bits.

For parting 16-bit and 32-bit mode; it's 16-bit if LSB is 1, so "Tstart +1", is plus LSB bit to 1 to tail of machine code.

Return 32-bit mode from 16-bit, we can use "mov pc, lr".

*One label of Literal can be present more different types.